INNER CODE UNIT · JavaScript

signOutUsingOAuth

ujjavaldesai07/spring-boot-react-ecommerce-app · client/src/actions/index.js:149

export const signOutUsingOAuth = googleAuth => async dispatch => {
    log.info(`[signOutUsingOAuth] googleAuth = ${googleAuth}, ` +
        `googleAuth.isSignedIn.get() = ${googleAuth.isSignedIn.get()}`)

    // if signed in then only try to sign out
    if (googleAuth && googleAuth.isSignedIn.get()) {

        log.info(`[signOutUsingOAuth] trying to signout`)
        googleAuth.signOut().then(() => {
            if (!googleAuth.isSignedIn.get()) {
                log.info(`[signOutUsingOAuth] Successfully signed out`)
                dispatch({
                    type: HANDLE_GOOGLE_AUTH_SIGN_OUT,
                    payload: null
                })
            }
        });
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…