@sean if I'm understanding you right, yes, the localstorage method is how I handle it
Top-level
7 comments | Expand all CWs
@sean exactly the first thing you said. The if/else thing could work but it's unusual for an endpoint to give two different results (other than say 200 vs 401) when authenticated or not. Typically you would render a different view template if logged in that accesses a different set of endpoints. @sean so you would have some api calls requiring a bearer token from localstorage, and some that work unauthenticated @darius cool, in a nutshell that's what I'm thinking of doing.
There seems to be some warning against storing tokens in the browser, so I'm exploring what other way this might be done securely. 😅 |
@darius @sean in any case I would say store locally