public void checkAuthStatus ( SimpleLoginAuthenticatedHandler handler ) { if ( androidContext != null ) { SharedPreferences sharedPreferences = androidContext . getSharedPreferences ( Constants . FIREBASE_ANDROID_SHARED_PREFERENCE , Context . MODE_PRIVATE ) ; String jsonTokenData = sharedPreferences . getString ( "jsonTokenData" , null ) ; if ( jsonTokenData != null ) { try { JSONObject jsonObject = new JSONObject ( jsonTokenData ) ; attemptAuthWithData ( jsonObject , handler ) ; } catch ( JSONException e ) { handler . authenticated ( null , null ) ; } } else { handler . authenticated ( null , null ) ; } } else { handler . authenticated ( null , null ) ; } }
Check the authentication status . If there is a previously signed in user it will reauthenticate that user .