Can be used to retrieve the userToken passed to setUserToken(). Will be undefined if the token has not been set yet.
userToken
setUserToken()
undefined
const userToken = authService.getUserToken()if (userToken) { // Use token here...} Copy
const userToken = authService.getUserToken()if (userToken) { // Use token here...}
Can be used to retrieve the
userTokenpassed tosetUserToken(). Will beundefinedif the token has not been set yet.Example