I'm trying to set up Pac4j in my back end (BE) application and in order to configure my Angular front end (FE), I need to understand the workflow that it expects in order to configure the back end properly.
I've been reading reams of documentation and trawling through Pac4j source to find how I get the token from the code without exposing the client secret.
So...
- I try to log in FE->BE (without auth)
- I receive a 401
- I take the 'Location' (the Google auth uri) from the 401 and redirect to it, providing a callback uri
- I log in to Google
- I am redirected back to my callback uri with a code
- (What request do I make to BE in order to get a token back? i.e. where is the token URI that doesn't require a client_secret)
- I use the retrieved token to access and continue as normal using BE