Log out from universal login (ios)?

Our sign in works fine. However, when we log user out, and user attempts to login again, their Auth0 widget won’t let them select login, it automatically logs in with last one they had. Any way to clear that out, so sign in button launches the widget and doesn’t auto login?

Could not find API’s in SDK for that.

Auth0
            .webAuth()
            .scope("openid profile email")
            .audience("...")
            .start {
                switch $0 {
                case .failure(let error):
                    //fail
                case .success(let credentials):
                    //success
                }
        }

Hi @Engineer!

Welcome to the Auth0 Community!

There are a couple of different strategies here. Either you need to clear the session with Auth0 by reaching the /logout endpoint, or you can add a param that forces the login prompt.

The /logout endpoint will require a redirect but will clear the session.

Adding .parameters(["prompt":"login"]) will force a new login.

Letting me know if this works for you.

Thanks,
Dan

1 Like

Thank you, this worked!

Glad to hear it worked for you!

Good luck,
Dan

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.