fix: social auth authentication workflow (#1264)
* fix: github login mutation * dev: updated social auth workflow and handled multiple loads on user * dev: mutaing user and updated analytics logout issue resolved --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
parent
49f19c2c44
commit
66807bef0d
5 changed files with 28 additions and 41 deletions
|
|
@ -19,12 +19,14 @@ export const GithubLoginButton: FC<GithubLoginButtonProps> = (props) => {
|
|||
} = useRouter();
|
||||
// states
|
||||
const [loginCallBackURL, setLoginCallBackURL] = useState(undefined);
|
||||
const [gitCode, setGitCode] = useState<null | string>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (code) {
|
||||
if (code && !gitCode) {
|
||||
setGitCode(code.toString());
|
||||
handleSignIn(code.toString());
|
||||
}
|
||||
}, [code, handleSignIn]);
|
||||
}, [code, gitCode, handleSignIn]);
|
||||
|
||||
useEffect(() => {
|
||||
const origin =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue