askidmobile / angular-6-social-login-v2

Social authentication module for Angular 6. Includes Facebook, Google, Vkontakte
0 stars 6 forks source link

[Google] Login persistence and custom provider parameters #1

Closed edgargaza closed 3 years ago

edgargaza commented 6 years ago

Hello everyone. I would like to know if there's some way to set different session persistance.

And also, there's any way to be able to set my own provider options? Like "prompt" to "select_account" and others.

Thanks in advance!

edgargaza commented 6 years ago

Pull request done to add custom Google provider parameters support.

askidmobile commented 6 years ago

Hello. Now I'm working on an improved vk (vk.com) authorization, just like you want, and then I'll add special options for BaseProvider to set additional parameters. Thanks again for your feedback.

edgargaza commented 6 years ago

Oh perfect then! ;)

askidmobile commented 6 years ago

One question, for what you need add get user() function, and import { MAT_CHIPS_DEFAULT_OPTIONS } from '@angular/material'; - for use material chips you must use the code in your app.

And last, how do you use this modification like this

    {
      id: GoogleLoginProvider.PROVIDER_ID,
      provider: new GoogleLoginProvider({client_id: "Your-Google-Client-Id", scope: 'email'})
    },

I think to add some params like this:

    {
      id: GoogleLoginProvider.PROVIDER_ID,
      provider: new GoogleLoginProvider("Your-Google-Client-Id"),
      options: [{ scope: "email", more*: "more*" }]
    },

This will be necessary to ensure compatibility versions.

edgargaza commented 6 years ago

Woops, that's right. The mat chips import is useless, I'm sorry.

I did the user getter to be able to access some user info, like it's email, name, etc. And yea, that's a good idea to keep the options separated from the provider ID.