简体   繁体   中英

OAuth 2 Close Tabs after Success Login

I'm facing problem when using OAuth 2 in my application, after a succefull login and redirection to my App ( browsable app ) i want to force closing tabs that i used in for login ( i'm using browser not webview ).

Any solution that i can do to force closing this tabs?

It is possible for a mobile app to invoke the external system browser, but not to close it afterwards. There is a preferred solution that usually meets the same goals though.

Use the AppAuth pattern, which works like this:

  • The user signs in via an integrated form of the system browser called a Chrome Custom Tab
  • This feels natural from a UX viewpoint, and the app can close this window when login completes
  • It is also good from a security viewpoint since the app itself never sees the user's password

See this Curity code example for a visual walkthrough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM