Is there a way to get the authenticated user in server routes ? #1395
              
                Unanswered
              
          
                  
                    
                      noook
                    
                  
                
                  asked this question in
                Questions and Help
              
            Replies: 1 comment 1 reply
-
| Currently there is no easy way to do this. You would need to copy the parts that make this possible in nuxt-vuefire in your server routes. I'm still exploring if there are ways to automatically do this in some routes | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    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.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, I guess the only way to get the authenticated user is to to read the Òession cookie by and make sure to send it with this method:
and server-side, create a utility like that:
However, this method throws error on the latest version of nuxt-vuefire because the token issuer don't match.
update: it seems it's
verifySessionCookieand notverifyIdTokenIs there an easier way (or undocumented) to do so ?
Beta Was this translation helpful? Give feedback.
All reactions