fusionauth-site
fusionauth-site copied to clipboard
Create a tutorial for integrating with identity providers via API
This would be a tutorial that would show how to add an authorize button to an application which would leverage FusionAuth as the data store for identities. It would also show how to access the opaque token stored in the identity link to get an access token to call APIs.
Scenario:
- changebank wants to allow users to refer people so it wants access to your google contacts. You get a better deal on change if you do this!
- in the changebank app, there's an 'connect to Google' button.
- that button uses the identity provider login OIDC API to complete the login. That is, the dev starts the OIDC process but FusionAuth completes it and holds the token.
- It uses the correct Google scope
https://www.googleapis.com/auth/contacts.readonly(from here) - After the user connects Google, the application then calls into FusionAuth to get the refresh token. Then it can call the Google API to get the contacts, which can then be displayed to the end user in a set of check boxes.
- Actually sending the referral emails can be left as an exercise for the reader.
This came out of this forum post: https://fusionauth.io/community/forum/topic/2569/how-do-i-call-a-google-api-or-retrieve-the-google-credentials
Internal: 74460
https://fusionauth.io/community/forum/topic/2659/access-google-calendars-of-multiple-google-accounts-with-user-permission also outlines this same process.