login with auth0, AuthSession.useAuthRequest, prompt: SelectAccount, dont show prompt

Please provide the following:

  1. SDK Version: 42
  2. Platforms(Android/iOS/web/all): android running on device directly
  3. Add the appropriate “Tag” based on what Expo library you have a question on.
    @expo-auth-session

The question is, why the first time, the prompt auth0 is showed and the next time it doesn’t show anymore. I put the prompt: prompt: ‘SelectAccount’,

import React, { useState, useEffect } from "react"
import { StyleSheet, View, Text, Button, Image, Platform } from "react-native"
import { StatusBar } from 'expo-status-bar'
import {
    setAuthenticated,
    setUserProfile,
    setToken
} from "../../features/program"
import { useDispatch } from "react-redux"
import AsyncStorage from "@react-native-async-storage/async-storage"

import * as WebBrowser from 'expo-web-browser';
import * as AuthSession from 'expo-auth-session';
import jwtDecode from 'jwt-decode';

// close, poppup de auth0, una vez que el usuario hace clic
WebBrowser.maybeCompleteAuthSession();

const redirect = "https://auth.expo.io/@xmazzuce/beathey-mobile";

const useProxy = Platform.select({ web: false, default: true });
const redirectUri = AuthSession.makeRedirectUri({ useProxy });

export default function Login() {

    const dispatch = useDispatch();

    // create and load, una solicitud a auth0
    const [request, result, promptAsync] = AuthSession.useAuthRequest(
        {
            redirectUri: redirect,
            clientId: clientId,
            // id_token will return a JWT token
            responseType: 'id_token',
            // retrieve the user's profile
            //  offline_access: para que devuelta un token de actualización
            scopes: ['openid', 'profile', 'offline_access'],
            **prompt: 'SelectAccount',**
            extraParams: {
                // ideally, this will be a random value
                nonce: 'nonce',
            },
        },
        { authorizationEndpoint }
    );

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.