Skip to content

Specify that you must return a value in the second parameter of authenticator.use #24

@BryceBlankinship

Description

@BryceBlankinship
    new GoogleStrategy({
        clientID: process.env.GOOGLE_OAUTH_CLIENT_ID,
        clientSecret: process.env.GOOGLE_OAUTH_CLIENT_SECRET,
        callbackURL: process.env.BASE_URL + '/auth/google/callback'
    },
        async ({ accessToken, refreshToken, extraParams, profile }) => {
            //TODO: create the user in the database!
            console.log(profile.emails[0].value)
            return profile.emails[0].value; << here
        })
)```

I was trying to figure out why it wasn't working for the longest time. I didn't have the database setup yet, so I didn't return a value in the second param of authenticator.use(). Turns out all I had to do to get this working (with any strategy, so it has to do with the parent repo remix-auth) was to return a value. Please add this to the documentation somewhere!! Or I can do it myself I just don't feel like it at the moment lol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions