Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix id token #342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thanhnh2-miichisoft wants to merge 1 commit into MomenSherif:master
base: master
Choose a base branch
Loading
from thanhnh2-miichisoft:fix-id-token

Conversation

@thanhnh2-miichisoft
Copy link

@thanhnh2-miichisoft thanhnh2-miichisoft commented Mar 29, 2024

No description provided.

antaranyan and fpuglap reacted with thumbs up emoji
Copy link

changeset-bot bot commented Mar 29, 2024

⚠️ No Changeset found

Latest commit: 7f71538

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Mar 29, 2024
edited
Loading

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
react-oauth ⬜️ Ignored (Inspect) Visit Preview Mar 29, 2024 8:12am

Copy link

taylorjdawson commented Sep 12, 2024
edited
Loading

@oobohP @MomenSherif can this get merged in?

Copy link

@taylorjdawson can you please merge it?

Copy link

@redoncordoor I wish I could but I am not a maintainer so I am unable to merge. You'd need to ping @MomenSherif

Copy link

eyueldk commented Nov 6, 2024

@MomenSherif Can you please review this change and merge it?

Copy link

elsemk commented Jan 16, 2025

Tested and available

`
import React from 'react';
import GoogleIcon from '@/assets/common/google-icon.png';
import { useAsyncEffect, useMemoizedFn } from 'ahooks';
import { googleClientId } from '@/utils/global';

import { gapi, loadGapiInsideDOM } from 'gapi-script';

const Login = () => {
useAsyncEffect(async () => {
const gapi = await loadGapiInsideDOM();
gapi.load('auth2', function () {
gapi.auth2.init({
client_id: googleClientId,
});
});
}, []);

const handleClickGoogle = useMemoizedFn(() => {
const auth2 = gapi.auth2.getAuthInstance();
auth2.signIn().then(function (googleUser: any) {
const googleInfo = googleUser.getAuthResponse();
console.log(googleInfo, '====');
const id_token = googleInfo.id_token;
if (id_token) {
// todo
}
});
});

return (


<div
className={'btn-primary flex-center-center'}
onClick={handleClickGoogle}
>

Google


);
};

export default Login;
`

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

Reviewers

1 more reviewer

@oobohP oobohP oobohP approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /