Move fetchProfile into constructor params
#94
sampolahtinen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I recently discovered that if
scopeincludesopenidthe library automatically calls auth0's/userinfoendpoint.https://github.com/danestves/remix-auth-auth0/blob/main/src/index.ts#L95
I have also noticed that this endpoint is rather slow. Execution time between 300ms to 1000ms.
Would it make sense to move the
fetchProfileto the constructor parameters so that users can opt in or out of it?The thing is that if the scope includes
openid, the auth0's/tokenendpoint returns accessToken and idToken, where the idToken already provides quite a bit user information. This information might be enough for most of the consumers and thus could avoid calling the extra /userinfo endpoint.WDYT?
Beta Was this translation helpful? Give feedback.
All reactions