I am working on an iOS app in swift 4 that uses Groupme Oauth. When the user clicks login for the first time, a safari browser opens and they are taken to Groupme's oauth page where they are prompted to enter their credentials. After verification, they are asked to return to the app.
When I log out and attempt login via Groupme a second time, the safari browser opens but the instead of presenting a fresh login screen for Groupme, the permission prompt which asks to return back to the app appears. So that means the previous user's access-token is automatically returned in the callback url instead of giving the current user an opportunity to log in and clearly that's no good.
So far, they only way I've been able to get around this was to manually delete Groupme info in my safari browser. Am I able to open the url in incognito mode or programmatically clear the cache? Any help is appreciated, thanks.
PS I've tried these, to see if it'd be different but to no avail:
UIApplication.shared.openURL(authURL!) WKWebView.load(authURL!)