devbaji / vue3-google-login

Add Sign In With Google feature to your Vue 3 application
https://github.com/devbaji/vue3-google-login/
MIT License
208 stars 30 forks source link

Cannot find the option for how to get refresh a jwt token #9

Closed sarvesh-simkraft closed 2 years ago

sarvesh-simkraft commented 2 years ago

After the user is logged in. Application is getting a jwt token which will expire after 1 hour. Can you please provide me an option to get a refresh token or to get a jwt token at the start with an expiration time of more than 1 hour?

devbaji commented 2 years ago

@sarvesh-simkraft this JWT token is usually used to confirm the user has a valid google account and to get basic details of that google account and this is done at backend (here is an example), after that JWT token is no more needed, rest of the login logic is done at backend, can you explain why you need to use this JWT again after 1 hour?

sarvesh-simkraft commented 2 years ago

I don't want my user to log out every one hour. so I want a refresh token or a token which lasts at least a day. to keep a login session at least for a day.

devbaji commented 2 years ago

@sarvesh-simkraft I believe this JWT token from google should not be used for checking you web applications login session, JWT credential is generated by google is only for getting basic info of that user for the initial login, after that login logic is usually done inside you application server side code.

sarvesh-simkraft commented 2 years ago

@yobaji ok thanks for helping me

sarvesh-simkraft commented 2 years ago

@yobaji ok thanks for helping me