Hi Taufik, Thank you for the response. I wound up doing something very similar. Though I admit, it may not be best practice, so I am open to suggestions.
What I did was to create a login module with Polymer, and used iron-ajax as you stated. I was not fully aware of iron-localstorage so I wound up adding a user object to app.js in the Polymer Starter Kit. Though it sounds like I will want to investigate iron-local-storage a bit more as it sounds like a better solution. Thanks, John On Tuesday, January 19, 2016 at 11:43:45 PM UTC-5, [email protected] wrote: > > Hello John, > > What I do to create Login module with Polymer: > - Create login module to put username & password and send them to the API > via iron-ajax to get a token > - And then save the token with iron-localstorage > - If the token is already in iron-localstorage, you can control the logic > of user logged > - Just that. This is right logic or bad for security reason? I still find > it, maybe anyone here can give a opinion about this? > > I hope can a bit help. > Taufik > > On Wednesday, 6 January 2016 17:52:54 UTC+1, John Brosan wrote: >> >> Hello everyone, >> >> I am new to Polymer and have been trying to get up to speed. I am >> currently developing an API using the Loopback (Node.js/Express) framework >> along with MongoDB and want to use Polymer 1.x as the frontend. I have >> security setup on the Loopback application and it works as expected. I am >> using the Polymer Starter Kit and would like to know how to add a login >> page to the app. How and where should I check to see if a user is logged in >> and redirect accordingly. I've been looking around and everything I see >> uses Firebase, which is great, but its not something I am using right now. >> >> Any advice or help would be most appreciated. >> >> Thanks, >> John >> > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/6809adc2-8586-4fbe-b6e1-08db5009c101%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
