ValentinFunk / firebase-steam-login

Login to firebase with Steam OpenID
GNU General Public License v3.0
22 stars 7 forks source link

SteamLogin using Angular2/4 #2

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi! i would like to learn how to create a functional steam login using angular and jwt tokens. i saw some of your repositorys and i see you understand alot about it . so back to my question, what would i need , and how does it work? i know there is auth0( not sure how to use it tho) would this concept be correct? MongoDb or Firebase (which one is more useful?) Express.js Angular ( Frontend ) Node.js and would it be a mean stack or just angular with an backend?

and how could i integrate jwt tokens to store the data ?

thanks in advance

ValentinFunk commented 6 years ago

Hey,

if you want to get an app up quickly I believe the best way would be to use Firebase (but use the new firestore API) alongside angular and run this repo on cloud functions.

Generally with the backend tech you've listed there are two modes:

Self made would mean you build everything yourself: You'll need a backend server (which would be for example express) and a database that will store your backend's data (for example mongodb). To host this stuff you'll either get your own virtual machines and install OS, node and mongodb on them or you could use a platform such as heroku where you just push your code and it kind of just works. You'll build Authentication and an API to access your data.

The BaaS approach would mean using firebase: you don't need to care about installing anything on servers or creating an API in express. You'll just define some rules about how your data looks and how you access it. Authentication is already built for you, you get client libraries for accessing data and everything scales automatically. You can pretty much focus on building your app. In the long run this is a bit more expensive since the hosting costs are higher.

Depending on which you choose you'd build your auth in different ways. This repo is made to be used with the BaaS approach: it integrates with Firebase for data storage and authentication. If you go down the "self made" approach, you wouldn't need anything here - you'd use express and passport for steam authentication. A simpler way to implement auth would then be to use cookie based auth instead of JWTs.

If you're just starting out with this tech i would very much recommend using the BaaS route - you can get features out much more quickly. I'd be happy to put together a demo app that shows how to use this repo :smile: Will be able to do that on the weekend

ghost commented 6 years ago

Alright, thanks for your advise ! i will keep that in mind and try to proceed now and create my first successful Angular 2 App with BaaS and i hope i'd be able to get it working, else i try to compare it later on with yours and try to improve my errors 👍

ghost commented 6 years ago

after sitting many days on this im getting frustrated that i cant proceed, im like lost in the code no idea where to start or what i should do , what would you recommend me to do? :/