sergiodxa / remix-auth

Simple Authentication for Remix
https://sergiodxa.github.io/remix-auth/
MIT License
2k stars 110 forks source link

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

Open EdenTurgeman opened 1 year ago

EdenTurgeman commented 1 year ago

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

Additional context

No response

sergiodxa commented 1 year ago

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