Adding basic google oauth login to extract user id(sud) and data from google login
Note that currently the implementation is making use of a zustand store to store the user data values as these values are computated from the jwt token which requires validation and decoding. As such to reduce the frequency of this, I chose to bind it to a store instead of a component. Also this serves to modularise the user data values and auth as well (set and unSet of the jwt token)
Feature
sud
) and data from google loginset
andunSet
of the jwt token)Note that the exact format of the ID token and its values can be found here: https://developers.google.com/identity/openid-connect/openid-connect#an-id-tokens-payload
New Envar
REACT_APP_GOOGLE_CLIENT_ID
: Client ID of google provider accountTests
Tested Locally: