react-native-fabric-digits
react-native-fabric-digits copied to clipboard
What is the suggested way to check if user already logged in?
The way I am achieving this now is to render a hidden login button and then call loginButtonRef.getSessionDetails()
to check if session data exist. If it exist then bypass the login UI flow.
However, rendering a hidden login button first feels a bit like a hack to me. Is there a better way to do this?
You could also do this:
import { NativeModules } from 'react-native';
NativeModules.DigitsManager.sessionDetails((error, sessionDetails) => {
...
});