Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
how to prevent re-use cookies of previous session using InAppBrowser( android)

I'm using react-native-inappbrowser-reborn package, when I try to Signin, the last account I logged in with is automatically selected. There is no solution to prevent using previous session cookies?? I'm not able to choose an account

export const openGateWay = async (provider: string, navigation: any, dispatch: any, type: string) => {
    const deepLink = getDeepLink('')

    const url = `https://auth.noxaws.com//oauth2/authorize?identity_provider=${provider}&redirect_uri=${deepLink}&response_type=CODE&client_id=3ci277sn2mjed01mpgflfd7uf2&scope=aws.cognito.signin.user.admin&email&openid&phone&profile`


if (await InAppBrowser.isAvailable()) {
    await InAppBrowser.close();
        const result = await InAppBrowser.openAuth(url, deepLink, {
            showTitle: true,
            enableUrlBarHiding: true,
            enableDefaultShare: true,
            forceCloseOnRedirection: false,
        })
        if (result.type === 'success') {
            let code = result.url.split(':').map((pair) => pair.split('='))[1][1]

            code = code.replace('#', '').replace('#_', '').replace('_', '')
            usersServices.httpRequest({ code, redirectUri: deepLink }, 'auth/exchange-code', 'POST').then((response: any) => {
                if (response && response.AccessToken) {
                    if (response.IsNewUser) {
                        setTimeout(
                            () =>
                                navigation.navigate('SignupFinalization', {
                                    userToken: response.AccessToken,
                                    refreshToken: response.RefreshToken,
                                })
                                ,
                                200
                                )
                            } else {
                                if (type === 'signup') {
                                    navigation.navigate('Login', { screen: 'LoginForm' })
                                } else {
                                    AsyncStorage.setItem('userToken', response.AccessToken)
                                    AsyncStorage.setItem('refreshToken', response.RefreshToken)
                                    dispatch({
                                        type: '@@user/LOGIN_USER',
                                        payload: { token: response.AccessToken, refreshToken: response.RefreshToken },
                                    })
                                    navigation.navigate('AppScreen', { screen: 'Home' })
                        }
                    }
                }
            })
        }
    }
    InAppBrowser.close()
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!