Hi,
I would like to know is there any method to find which connection the signed-in user used to sign in. For instance, how can we know whether user signed in using Facebook or Google or Auth0 database.
Thanks
Hi,
I would like to know is there any method to find which connection the signed-in user used to sign in. For instance, how can we know whether user signed in using Facebook or Google or Auth0 database.
Thanks
Welcome to the Auth0 Community, @hiran.amarasinghe!
The most straightforward way to check this would be to take a look at the user’s profile from your Auth0 Dashboard or just take a look at your tenant logs. For example, this is what you would see from the user’s profile:
If you are interested in retrieving that data programmatically and not via the Auth0 Dashboard, this could be accomplished via our Management API. I can think of a couple of endpoints that should do the job:
You would call those endpoints filtering by “type”: “s” and then you could look at the “connection” attribute.
I hope this helps.
Hi @Ale,
Thanks a lot for your quick clarification. However, that does not seems to solve my problem as I need to know the connection information at the event of user sign in. After explore further, I was able to find two solutions
function addAttributes(user, context, callback) {
context.idToken[‘https://example.com/connection’] = context.connection;
callback(null, user, context);
}
Here, I could get more accurate details related to the connection
Hope this would help any one
Thanks