Skip to content

How to implement Google One Tap #178

Description

@irg1008

Hi, I was wondering how to reuse callback and login endpoint for google auth while using the one tap solution:

I have the next (Next.JS) front code

export const GoogleOneTap = () => {
  const logInUrl = `${config.apiUrl}/auth/google/callback`
  return (
    <>
      <Script src="https://accounts.google.com/gsi/client" async defer />
      <div
        id="g_id_onload"
        data-client_id={config.googleClientID}
        data-login_uri={logInUrl}
        data-cancel_on_tap_outside="false"
      />
    </>
  )
}

I was wondering if there is a built-in solution or how should I parse the data to achieve one tap login

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions