Skip to content
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

Please help me with this error #16

Open
Ashutosh102 opened this issue Jun 23, 2022 · 5 comments
Open

Please help me with this error #16

Ashutosh102 opened this issue Jun 23, 2022 · 5 comments

Comments

@Ashutosh102
Copy link

Uncaught Error: createIfNotExists() requires that the document contains an ID ("_id" property)

@Atharva-3000
Copy link

Any updates?
Facing the same issue

@mmatrevi
Copy link

mmatrevi commented Nov 3, 2022

anyone found solutions to the above issue yet....cos iv'e been facing it too

@Luluameh
Copy link

same here any one to help please

@moinuddinrao
Copy link

I have updated the code with new Google Authentication, you can see it below.

import React from 'react';
import { useNavigate } from 'react-router-dom';
import { FcGoogle } from 'react-icons/fc';
import { GoogleOAuthProvider, GoogleLogin} from '@react-oauth/google';
import jwt_decode from 'jwt-decode';
import shareVideo from '../assets/share.mp4';
import logo from '../assets/logowhite.png';

import { client } from '../client';

const Login = () => {
const navigate = useNavigate();
const createOrGetuser = async (response) => {
const decoded = jwt_decode(response.credential)
localStorage.setItem('user', JSON.stringify(decoded))
const { name, email, picture, sub } = decoded;
const doc = {
_id: sub,
_type: 'user',
userName: name,
image: picture,
}

  client.createIfNotExists(doc)
      .then(() => {
          navigate('/', { replace: true })
      })

}
return (



@Rajath8105
Copy link

@moinuddinrao brother please aaccept my instagram request username: rajat_katti i have lot of problems in this project i have to submit it within 3 days in college plz respond thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants