remix-auth icon indicating copy to clipboard operation
remix-auth copied to clipboard

userProfile method is protected even though it's an easy way to access user info

Open EdenTurgeman opened this issue 2 years ago • 1 comments

Describe the bug

I would love to be able to access the userProfile method in my remix app to identify the currently logged in user. Auth0-js has this functionality built in the client and i think we should expose it here unless i'm missing something

Your Example Website or App

https://stackblitz.com/none

Steps to Reproduce the Bug or Issue

image

Expected behavior

I would love to have an easy way to get the use info from the auth0 strategy/authenticator

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

EdenTurgeman avatar Nov 27 '22 12:11 EdenTurgeman

You get that information when the verify callback you pass to the strategy is called

There you can do whatever you want with the data, including returning it so it’s going to be accessible when calling isAuthenticated

sergiodxa avatar Nov 27 '22 13:11 sergiodxa