Utilizing A User Picture from OAuth Provider
When you successfully log in via OAuth, you will retrieve a URL link to the user's picture as part of the API response, if it exists. You can utilize this to display a profile picture for users in your web application or any other use case where you would like to associate a user with their picture, such as on an admin dashboard. This guide will explain how to use the picture attribute.
Getting the Picture from the API Response
It is very simple to use, you just need to embed the URL that comes from a successful OAuth API response, into your website somewhere. This picture is always accessible via the URL that is returned from the API.
This response is from a successful Google social login:
You can see that picture
contains a URL to the profile picture.
An example using HTML would be something like this in the front end of a web application to show the profile picture:
If the user is coming from OAuth, you cannot set this picture attribute either in the Console or through any of the user management APIs, as this comes from Google and not Descope.
If you have any other questions about Descope or OAuth user attributes, feel free to reach out to us!