# Showing Login Alert popup, When logout from iOS Device ( Language :- Swift )

**URL:** <https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369>\
**Category:** Get Help\
**Tags:** logout, auth0\
**Created:** [February 24, 2020, 12:36pm UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369 "2020-02-24T12:36:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![amtdeveloper](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/amtdeveloper/32/12814_2.png) [@amtdeveloper](https://community.auth0.com/u/amtdeveloper)\
**Post date:** [February 24, 2020, 12:36pm UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/1 "2020-02-24T12:36:44Z")

</div>

We are facing the issue, when we logout from Auth0.  
its showing Login alert ( and asking :- “wants to sign in…” ), not showing logout thing.

Can you provide some guidance to overcome this issue.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 24, 2020, 6:01pm UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/3 "2020-02-24T18:01:02Z")

</div>

Hi @amtdeveloper,

What request is being made during logout? Can you provide the code?

Thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![amtdeveloper](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/amtdeveloper/32/12814_2.png) [@amtdeveloper](https://community.auth0.com/u/amtdeveloper)\
**Post date:** [March 2, 2020, 4:56am UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/4 "2020-03-02T04:56:36Z")

</div>

Hi Dan,

Thank you for responding

Here’s the code i calling , when I sign out

```auto
  Auth0
            .webAuth()
            .clearSession(federated: false){
                
                switch $0{
                    
                case true:
                    
                    print("Done")
                    
                    let mainStoryBoard = UIStoryboard(name: "Main", bundle: nil)
                    let redViewController = mainStoryBoard.instantiateViewController(withIdentifier: "LoginVC") as! LoginVC
                    let appDelegate = UIApplication.shared.delegate as! AppDelegate
                    appDelegate.window?.rootViewController = redViewController
                    appDelegate.window?.makeKeyAndVisible()
                    
                    break
                    
                case false:
                    
                 print("Not Done")
                    
                }
        }

```

Thanks,  
amtDeveloper

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 3, 2020, 6:49pm UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/5 "2020-03-03T18:49:00Z")

</div>

@amtdeveloper,

What are you expecting to see when you say the ‘logout thing’?

---

<div class="post-metadata">

**Author:** ![amtdeveloper](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/amtdeveloper/32/12814_2.png) [@amtdeveloper](https://community.auth0.com/u/amtdeveloper)\
**Post date:** [March 6, 2020, 7:39am UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/6 "2020-03-06T07:39:07Z")

</div>

Hi Dan,

I’m Expecting the result like…

1. it should show the - popup as " Wants to signout"; when i hit the Sign out
2. & When i sign out from the app; the credentials should be removed in SDK & Web too…
3. when I sign in again it should not take previous credentials, it should ask new credentials to signin.

Thanks,  
AmtDeveloper

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 6, 2020, 2:37pm UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/7 "2020-03-06T14:37:37Z")

</div>

After you are making the clearSession call are you getting a confirmed logout? Can you record a screen capture to show what happens?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 20, 2020, 6:37pm UTC](https://community.auth0.com/t/showing-login-alert-popup-when-logout-from-ios-device-language-swift/38369/8 "2020-03-20T18:37:41Z")

</div>

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