This is a sample app that integrates with Google Identity Platform doing a OAuth2 implicit authentication flow with the result being an Open Id Connected Id Token. The token can then be validated against a service using an Express authentication middleware.
First register a OAuth2 client:
- Go to https://console.cloud.google.com/apis/credentials
- Click "Create credentials"->"OAuth Client ID"
- Select "Web application"
- Add "Authorised JavaScript origins", fx. http://localhost:3000 for testing this app
- Add "Authorised redirect URIs", fx. http://localhost:3000/index.html for testing this app
node index.js '<OAuth Client ID>'