node.js - Steam authentication API, passing data back to Angular -


i have problem express(nodejs)/angular web app rely on steam's login authentication. when user clicks "login" he's redirected steam authentication(steam's website), once logged in user redirected specific route on backend called /verify. once user hits /verify there session variables containing necessary user data access. therefore use jwt generate token data send client(angular in case).

the problem sending token frontend(the client) save in local storage.

any highly appreciated! currently, pass token via query string redirect frontend, doesn't seem solution.

maybe should stick server-side sessions , write http routes user data. problem approach once again client unaware when user authenticates himself on backend, since callback triggered on backend.

edit: tried approach, once again unsure of it's right way go both code-wise , security-wise.

  1. redirect user steam authentication page.
  2. wait authentication callback on server side, in case hits route '/verify'.
  3. once @ /verify session cookie set, therefore redirect user angular app specific route called '/login'.
  4. on /login user requests token based on session cookie on server, token in case json web token(jwt).
  5. once token saved in local storage redirect user page in angular app.

if wrong way it, please let me know!


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -