ory / kratos

The most scalable and customizable identity server on the market. Replace your Homegrown, Auth0, Okta, Firebase with better UX and DX. Has all the tablestakes: Passkeys, Social Sign In, Multi-Factor Auth, SMS, SAML, TOTP, and more. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=kratos
Apache License 2.0
11.24k stars 963 forks source link

Some way to get the data from exchange using the discord provider #2574

Closed zwinnerman-fleetdm closed 2 years ago

zwinnerman-fleetdm commented 2 years ago

Preflight checklist

Describe your problem

Once a user identifies via Kratos, there could be a need to get further information from Discord using the returned token (similar to how Kratos's Discord provider does this internally). In order to do this, at the very least the returned AccessToken would need to be able to be able to be accessed.

Describe your ideal solution

The ideal solution would be to repurpose some parts of the claim to include the access and refresh tokens.

Workarounds or alternatives

Not use Kratos and implement my own oAuth. Without this info being able to be stored somewhere the info seems to be impossible to get.

Version

0.10.1

Additional Context

https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes in case somebody needs a link

zwinnerman-fleetdm commented 2 years ago

I figured it out for future people. Querying /admin/identities with ?include_credential=oidc gives you the tokens needed.