ronzeidman / ng2-ui-auth

an angular2 repository for authentication based on angular1's satellizer
MIT License
206 stars 64 forks source link

How to ask for credentials every time in popup window? #86

Closed robgaleano closed 7 years ago

robgaleano commented 7 years ago

It doesn't seem very clear on documentation, or at least i don't know if this is a current feature, but if it exists can someone please tell me how to implement it? i've been using the library for a while and it works perfect but i need it to ask for credentials every time the popup appears instead of just being loaded automatically from cookies or from whatever the last session on the social network is stored.

ronzeidman commented 7 years ago

Hi, every provider has his own implementation for such a feature. Google for example has an additional optional "prompt" parameter which you can use to force users to go to the "select account" screen or "consent" screen.

    providers = {google: {
        clientId: GOOGLE_CLIENT_ID,
        prompt: 'select_account'
    }};

https://developers.google.com/identity/protocols/OAuth2UserAgent

Other providers may have different parameters or maybe they don't support such an option at all.

ronzeidman commented 7 years ago

No response, closing.