Skip to content

Commit 7391422

Browse files
committed
Update example
1 parent 2f94a06 commit 7391422

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

example/App.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,19 @@ export default class App extends Component {
102102
}
103103

104104
async tryDeepLinking() {
105-
const loginUrl =
106-
'https://proyecto26.github.io/react-native-inappbrowser/';
105+
const loginUrl = 'https://proyecto26.github.io/react-native-inappbrowser/';
107106
const redirectUrl = encodeURIComponent(this.getDeepLink('home'));
108107
const url = `${loginUrl}?redirect_url=${redirectUrl}`;
109108
try {
110109
if (await InAppBrowser.isAvailable()) {
111-
const result = await InAppBrowser.openAuth(url, redirectUrl);
110+
const result = await InAppBrowser.openAuth(url, redirectUrl, {
111+
showTitle: true,
112+
toolbarColor: '#6200EE',
113+
secondaryToolbarColor: 'black',
114+
enableUrlBarHiding: true,
115+
enableDefaultShare: true,
116+
waitForRedirectDelay: 1000
117+
});
112118
await this.sleep(800);
113119
Alert.alert('Response', JSON.stringify(result));
114120
} else {

0 commit comments

Comments
 (0)