DEV Community

Discussion on: How to Implement Login with Google in Nest JS

Collapse
 
thisismydesign profile image
thisismydesign

Hey Michael, this is a nice guide to get started, but isn't it incomplete? Every time I visit a guarded page I'm redirected to Google's OAuth page again. Shouldn't there be a step to use the received accessToken? Or how should the server handle subsequent requests?

Collapse
 
imichaelowolabi profile image
Michael Owolabi • Edited

Hello @thisismydesign thank you for your kind words.

About your question, yes the received access token should be used but the use will differ across various applications which will be determined by the use case in the application and the developer. My aim in writing this article is just to show to authenticate with Google OAuth in a Nest application.