Open YoranSys opened 1 month ago
Hey
The next version of Rio will ship with an example of how to implement authentication (https://github.com/rio-labs/rio/tree/main/rio/snippets/snippet-files/project-template-Authentication). This is using classical, locally stored usernames/passwords rather than OAuth, but it shows the gist of authentication. My question is, what prevents us from just extending this to also include OAuth. I don't see what Rio itself needs to support to enable this.
Need some js file for automatic token refresh
Can you expand on that? I was thinking of refreshing the token whenever a user starts a new session, or maybe when they switch pages or any other frequent (but not too frequent) action.
@Sn3llius might be interesting for you to also watch this issue, given that you've implemented the authentication example
Yes, I was considering expanding the authentication example to include OAuth 2.0 support in the near future. Possibly sooner rather than later! 😄
Description
Modern sites or apps need to provide social login based on OAuth 2.0 code flow. In the context of rio and OAuth 2.0, the PKCE code flow can be used at the frontend and token validation on the backend side.
Good starting point for OAuth2.0: https://dev.to/hem/oauth-2-0-flows-explained-in-gifs-2o7a
Suggested Solution
Maybe based on :
Alternatives
No response
Additional Context
No response
Related Issues/Pull Requests
No response