Code Monkey home page Code Monkey logo

Comments (5)

ataillefer avatar ataillefer commented on September 26, 2024 2

Yes that's the way, by handling the OAuth redirect URL with a listener that finally navigates to the another view once the flow is done, typically your app's home view:

componentDidMount() {
  Linking.addEventListener('url', this._handleOAuthRedirectURL);
}
...
_handleOAuthRedirectURL(options) {
   // do domething with options.url
   ...
   // navigate to the home view
}

from react-native-custom-tabs.

ataillefer avatar ataillefer commented on September 26, 2024

Don't think so, but why would you want to do this?

from react-native-custom-tabs.

edo1493 avatar edo1493 commented on September 26, 2024

I am using it for a OAuth login flow, so I would like to close the view, once the user has logged in.

I can still do it cause I have an intent that listens to a deep link, so the custom tabs view is shutdown, when the login is successful.

from react-native-custom-tabs.

petlys avatar petlys commented on September 26, 2024

I'm working on a project which is just an app in a Webview utilising this package for OAuth authentication. How would one go about dismissing the custom tabs in this case?

from react-native-custom-tabs.

rsjolundchas avatar rsjolundchas commented on September 26, 2024

Yes that's the way, by handling the OAuth redirect URL with a listener that finally navigates to the another view once the flow is done, typically your app's home view:

componentDidMount() {
  Linking.addEventListener('url', this._handleOAuthRedirectURL);
}
...
_handleOAuthRedirectURL(options) {
   // do domething with options.url
   ...
   // navigate to the home view
}

Do you know how to handle this when the the app with chrome-tabs is in the background? In that case the Linking event never seems to be fired.

from react-native-custom-tabs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.