getSession() vs getToken() #3411
-
Which is recommended for securing the backend and why? I see documentation uses both as examples but in essentially the same way. |
Beta Was this translation helpful? Give feedback.
Answered by
balazsorban44
Dec 9, 2021
Replies: 1 comment 4 replies
-
Depends on your use case.
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
DNoel26
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Depends on your use case.
getToken
is much simpler, but only works with the JWT strategy.getToken
also exposes anything returned from thejwt
callback, whilegetSession
only exposes what is returned from thesession
callback.