react-google-login
react-google-login copied to clipboard
403: Request had insufficient authentication scopes.
Does anyone know what scopes I need to access this api endpoint? https://gmail.googleapis.com/gmail/v1/users/{userId}/messages
const login = useGoogleLogin({
onSuccess: async codeResponse => {
let {code} = codeResponse
const {data} = await axios.post('http://localhost:3000/auth/google', {
code,
});
setAccessToken(data.access_token)
},
flow: 'auth-code',
scope: "???",
});
Also how I can get userId for the oauth user. Thanks.