Since Google Auth does not support wildcards in its redirect URL's, I am trying to create a proxy solution for Google Authentication. I have read the following two posts but need some more clarifications
Primarily I have one domain say www.abcxyz.com
I need to have the Google Auth mechanism work for number of subdomains say:
alpla.abcxyz.com
beta.abcxyz.com
and so on for dynamically created subdomains
Following is something I want to try:
- I will have only 1 redirect URL in the client secret json file say google.abcxyz.com
- When creating a redirect url I pass the name of the subdomain 'alpha' in the state parameter
- Once auth code is sent from google to google.abcxyz.com my proxy code reads the state parameter and forwards the request to alpha.abcxyz.com. This domain will then exchange the auth code for access token and refresh token.
Will this kind of mechanism work or do I need to do something more?
Will access tokens work from the subdomain?
What happens when access token expires?