react-native-fabric-digits icon indicating copy to clipboard operation
react-native-fabric-digits copied to clipboard

What is the suggested way to check if user already logged in?

Open lsps9150414 opened this issue 8 years ago • 1 comments

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?

lsps9150414 avatar Aug 05 '16 02:08 lsps9150414

You could also do this:

import { NativeModules } from 'react-native';

NativeModules.DigitsManager.sessionDetails((error, sessionDetails) => {
      ...
});

smilledge avatar Oct 19 '16 06:10 smilledge