wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.7k stars 1.13k forks source link

Implement proper support for OAuth refresh tokens #2124

Open infomiho opened 6 days ago

infomiho commented 6 days ago

We are only giving the users the access token in onAfterSignup auth hook. We plan on introducing login related hooks in #2117

We should also give users the refresh token alongside the access token. We should also then investigate how the refresh token will be used to get the new access token over time (https://arctic.js.org/guides/oauth2, scroll to Refresh access token).

This would most likely mean that the OAuth client instance would need to be available to the users (e.g. google client we use internally should become available via some SDK import).