I use the React Native SDK to signup/login the user. The user gets logged out automatically the next day when he opens the app again. I have set all the limits to maximum allowed in auth0 config. PFA screenshot. I would like the user to be logged in for atleast 15 days.
Here is the code snippet
import { useAuth0 } from ‘react-native-auth0’;
const { user, isLoading } = useAuth0();
useFocusEffect(
useCallback(() => {
checkUserAuth()
}, [])
)
useEffect(() => {
if (!isLoading) {
checkUserAuth()
}
}, [isLoading])
const checkUserAuth = async () => {
const token = await AsyncStorage.getItem(‘user_token’)
if (!token) {
moveUserToLoginPage()
}
if (isLoading) {
return
}
try {
if (user) {
setLoading(true)
actions.GetDashboard({})
} else {
await moveUserToLoginPage()
}
} catch (e) {
console.error('error in checkUserAuth', e)
setLoading(false)
}
}
I tired printing the refresh token and its null after doing a fresh login.
const credentials = await getCredentials()
“Null here in the refresh token”
How do I solve this? Thanks in advance.