You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read through many materials but didn't find any proper ones to be used.
Here is the Use case:
I implemented Google Auth2 login/singup using Passport & passport-google-oauth2, and I am not using any type of session instead I am using JWT token to exchange the details from server to React application and vice-versa.
From the frontend(ReactJS) I want to login using google login by calling my expressjs API.
I see people using either window.open or <a href="pathe to passport API for google authentication"> Login </a> to call their server API which redirects to the google login page, and then they use an established session to fetch user details then on.
But the above approach won't work if we use JWT, where API needs to return its own token to the client side once google login cycle is complete in the same single flow.
So what is the best approach to implement google auth using passport and passport-google-oauth2 from reactJS when we use JWT and not Session?
The text was updated successfully, but these errors were encountered:
Not for now sir, I have to manual call to google api and validate it
Vào Th 2, 24 thg 7, 2023 vào lúc 22:08 ankitbibiyaan1992 <
***@***.***> đã viết:
--
Trân trọng,
-------------------------------------
*Nguyễn Thái Ngọc *
*Chuyên ngành*: Công nghệ thông tin - chương trình chất lượng cao
*Số điện thoại*: (+84)92 463 8614
*Portfolio*: https://ntngoc96.github.io/portfolio/
*Email*: ***@***.***
Hi Team,
I read through many materials but didn't find any proper ones to be used.
Here is the Use case:
I implemented Google Auth2 login/singup using Passport & passport-google-oauth2, and I am not using any type of session instead I am using JWT token to exchange the details from server to React application and vice-versa.
From the frontend(ReactJS) I want to login using google login by calling my expressjs API.
I see people using either
window.open
or<a href="pathe to passport API for google authentication"> Login </a>
to call their server API which redirects to the google login page, and then they use an established session to fetch user details then on.But the above approach won't work if we use JWT, where API needs to return its own token to the client side once google login cycle is complete in the same single flow.
So what is the best approach to implement google auth using passport and passport-google-oauth2 from reactJS when we use JWT and not Session?
The text was updated successfully, but these errors were encountered: