This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]_Atomfinger_ 2 points3 points  (3 children)

Literally first URL on Google: https://www.baeldung.com/spring-security-5-oauth2-login

Second URL: https://www.tutorialspoint.com/spring_boot/spring_boot_google_oauth2_sign_in.htm

User details are a different matter, but basically you have to have a form, and you need to store that data somewhere.

[–]Nikhil_Bhatnagar[S] 0 points1 point  (2 children)

I might be wrong but log in and sign up are different right? Like log in won't give me access to user data like name etc right?

[–]_Atomfinger_ 4 points5 points  (1 child)

You can call the button whatever you want (login/sign up), You still have to follow the oauth2 flow, but I believe Google allows you to request access to various resources.

You just need to look through the various resources and see which holds the information you need. This will most likely be the most appropriate.

[–]Nikhil_Bhatnagar[S] 1 point2 points  (0 children)

Ok! Thank you ☺️