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
-
Hi!
I recently discovered that if
scope
includesopenid
the library automatically calls auth0's/userinfo
endpoint.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
fetchProfile
to 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/token
endpoint 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