Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Auth2 issue getting JWT token from server when different ports #416
I am using two different ports for two different apps, one for client side and one for server side, 3000 for client, 3030 for server. I have set up google auth2 and on the client side have a link to go to :3030/auth/google, perfect, that send me to the google.com auth page and then I accept and it goes back to :3030/auth/success
in my config/default.json
and in app.js, I create a route for /auth/success and this is where I'm stuck.
NOTE: Need to add
How do I pass this back to my client side?
I also assume that the feathers client will not find it in the query params and I will have to manually set it into the localStorage? That also seems strange.
Is it bad practice to have two domains for client and server, seems pretty standard to me as I prefer having two distinct apps. I guess most people just run the client/server on the same port?
You can use query string if you are turnin on full SSL. Or another option that I use is to create a simple HTML page to replace the Feathers success page. Just have.a script on that page read the token from the cookie, create a new cookie for the other domain, then do a client redirect.