Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really...How to use it ? #752

Open
Epameinondas-Theodoropoulos opened this issue Feb 13, 2024 · 1 comment
Open

Really...How to use it ? #752

Epameinondas-Theodoropoulos opened this issue Feb 13, 2024 · 1 comment

Comments

@Epameinondas-Theodoropoulos

So the main problem is how to use this library.

I mean I want all the steps because I have so many days that I am searching and i cannot find a solution.

So i did all the steps for the configuration and I have this in the HTML in my Angular app:

<asl-google-signin-button type="standard" size="medium" text="signin_with" ></asl-google-signin-button>

So i get a SociaUser with an id and idToken.

Eveytime I refresh the page I got this . I cannot understand why. Eventhough I already clicked to log in with Google
image

Eveytime I click the login google button then click the logout function
this.authService.signOut();
I Get this error:
image

Now the questions:

  1. What to do with them? Should i send them to my backend and save them ?
  2. If yes why to do that ?
  3. If no why not ?
  4. Is the id unique and the same all the time
  5. Seriously what is the point of
    refreshAuthToken(GoogleLoginProvider.PROVIDER_ID);
  refreshAccessToken(GoogleLoginProvider.PROVIDER_ID);

Could you tell me where and when I need to use them ? I cannot find anything. Also i do not see in SocialUser and expirationTime or something like that.

6 ) I have a spring boot back end. I searched so many sites and they talk how to create an OAuth2 with Resource Server, Authorization Server etc... Does this library need to implement an OAuth2 in my backend or not ? I cannot understand if that is need it.
7) What is the difference to use this library and the back end. I mean it has any difference ? Must i use both ? What is the right way?
8) Give someone the steps and the general differences and the 'right' path.
9) I search for pages that show only to use the library and nothing more. And others that do so much complicated configuration with back end. What is the right way to it in the end ?

I want to log in and authorize my user in my app either with a custom email either with google and then the user will have his account with his information. That it. I believe is functionality that it is used everywhere...

I cannot believe that i am the only one that has these questions...

@maxnag
Copy link

maxnag commented Jul 5, 2024

This app allows you to only get from social networks their data.
And if you need to get data from your API I think, you need to register/check existing users in your DB and then get a token from your API and work with it.

How come your API knows about new user coming from social?

It's a complex task)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants