Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

78
Views
Login with Google: How to programmatically open prompt for user consent and get the CredentialResponse on success

I am trying to trigger the Prompt for User Consent to open on clicking a custom html button rather than the Login iframe button rendered by Google. I am using Sign In With Google JavaScript API and I didn't found a function to do this, but I found a way to do this using the token model and using the Code Model but these gives me token/code in the callback, but I need a CredentialResponse in callback, is there any way to do this ? I am trying to create Vue/React plugins to easily implement Sign In With Google,One-tap sign-up and Automatic sign-in features in Vue/React applications, but I am stuck now.

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

you can use @react-oauth/google it uses the new google service identity SDK, with useGoogleLogin() custom hook it can be used with your custom button.

and you can check the implementation of the hook to do the same work in vue

7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs