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

Logout feature #55

Open
Nevaan opened this issue Mar 29, 2019 · 2 comments
Open

Logout feature #55

Nevaan opened this issue Mar 29, 2019 · 2 comments

Comments

@Nevaan
Copy link
Contributor

Nevaan commented Mar 29, 2019

Hi,

I am using this plugin to authenticate via Auth0 (nativescript + angular project), and so far I am able to succesfully login, but I am having problem with logout functionality.
Initially, when I call webAuthentication method I am redirected to browser, here I enter credentials and I am redirected back to application - that is good when I am doing so for the first time. But in case I logout (in my application - before token expires), and call webAuthentication method again, the browser pops out, authenticates me automatically and redirects to the application, which may not be a desired scenario every time (for example, if I want to log as another user).

I have noticed that if I clear cache of browser (android and iOS - outside of my application, in browser settings) - I am asked to reenter credentials, which is the behavior I want

Do anyone have idea how I can achieve this programatically?

@Nevaan
Copy link
Contributor Author

Nevaan commented Mar 31, 2019

Hi,

I think I was able to achieve it by myself finally. If anyone looked for solution, I have added "prompt" parameter to webAuthentication method like this:

this.auth0.webAuthentication({
        scope: SCOPES,
        scheme: SCHEME,
        parameters: {
          "prompt": "login"
        }
      })

Maybe it would be worth mentioning in plugin documentation and/or demo application? Even reference to auth0 where possible paramteres are described would be helpful.

@mm-spiio
Copy link

How does this help logging out @charsleysa ?

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

No branches or pull requests

3 participants