Comments (5)
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.
Don't think so, but why would you want to do this?
from react-native-custom-tabs.
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.
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.
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)
- Pre-starting / Pre - feching in react native chrome custom tab
- Not working in React Native 0.56 HOT 1
- Bump version and publish on npm
- React Native 0.56+ android build failure
- package com.github.droibit.android.reactnative.customtabs does not exist HOT 2
- Is there a way to know that user got back to the app? HOT 1
- Is there a way to add a custom menu item?
- Adding support for SafariView for iOS HOT 1
- Is there any way to create a callback function on attempt to close the custom tab?
- Typescript support
- Podspec needed for RN0.60 HOT 2
- Path or configuration is wrong when compiling project to ios HOT 2
- React custom tabs component crashing Xcode
- Navigation is blocked
- Cannot find symbol CustomTabsIntent HOT 1
- Still maintained? HOT 3
- Build failing on `import android.support.customtabs.CustomTabsIntent`
- openURL fails on ios HOT 3
- Support new React Native new architecture
- upgrade reac-native to 0.71.6,an error occurred HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-custom-tabs.