stale-jordan-56694
12/23/2024, 9:53 AMbrief-egg-61061
12/23/2024, 9:53 AMbrief-egg-61061
12/23/2024, 9:53 AMemail
scope to request access to the user's email address. This is done in the Ory configuration: yaml selfservice: methods: oidc: config: providers: - id: facebook provider: facebook client_id: .... client_secret: .... mapper_url: "base64://{YOUR_BASE64_ENCODED_JSONNET_HERE}" scope: - email
3. Facebook only returns an access_token
and doesn't return an id_token
. Ory handles this by sending requests to Facebook's Graph API to retrieve user information and adds it to std.extVar('claims')
for use in data mapping. 4. In your application, you'll need to implement the OAuth2 Authorization Code flow to obtain the access token. The [OAuth2 Authorization Code Flow documentation](https://www.ory.sh/docs/oauth2-oidc/authorization-code-flow) provides details on how to implement this flow. 5. Once you have the access token, you can use it to make requests to Facebook's APIs on behalf of the user. However, it's important to note that this access token is meant for use with Facebook's APIs, not directly with Ory's APIs. Remember that OAuth2 scopes are not permissions. As stated in the [OAuth2 concepts documentation](https://www.ory.sh/oauth2-openid-connect-do-you-need-use-cases-examples/#scopes-are-not-permissions), "The OAuth2 scope does not say what a user can and cannot do." The access token represents that the client application has been authorized by the user to access certain resources on their behalf. For secure handling of tokens and implementing the full OAuth2 flow, it's recommended to follow best practices and use well-tested libraries that support the OAuth2 and OpenID Connect protocols.