edwinn1337
05/27/2022, 1:01 PMshop-web:dev: error - Error: Request failed with status code 400
rp_st
05/27/2022, 1:04 PMrp_st
05/27/2022, 1:04 PMedwinn1337
05/27/2022, 1:07 PMedwinn1337
05/27/2022, 1:08 PMjs
appInfo,
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
],
edwinn1337
05/27/2022, 1:08 PMedwinn1337
05/27/2022, 1:09 PMemailPassword
implementation works already 🙂edwinn1337
05/27/2022, 1:10 PMedwinn1337
05/27/2022, 1:10 PMnkshah2
05/27/2022, 1:10 PMnkshah2
05/27/2022, 1:12 PM/authorisationurl
endpointedwinn1337
05/27/2022, 1:13 PMjs
{
"status": "OK",
"url": "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&client_id=710520535551-0esc730d0evhv0k77d13v3v3sutla97s.apps.googleusercontent.com"
}
edwinn1337
05/27/2022, 1:13 PMedwinn1337
05/27/2022, 1:13 PMedwinn1337
05/27/2022, 1:14 PMjs
{"status":"OK","url":"https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&client_id=710520535551-0esc730d0evhv0k77d13v3v3sutla97s.apps.googleusercontent.com"}
edwinn1337
05/27/2022, 1:16 PMnkshah2
05/27/2022, 1:21 PMedwinn1337
05/27/2022, 1:24 PMedwinn1337
05/27/2022, 1:24 PMnkshah2
05/27/2022, 1:31 PMedwinn1337
05/27/2022, 1:34 PMnkshah2
05/27/2022, 1:35 PMnkshah2
05/27/2022, 2:06 PMdata
should have more information about the error (Third party providers usually explain the error or have a specific code here)edwinn1337
05/27/2022, 2:38 PMedwinn1337
05/27/2022, 2:38 PMjs
const response = await getThirdPartyAuthUrl({ thirdPartyId: 'google' })
if (response.status === 'OK') {
const url = new URL(response.url)
url.searchParams.append('redirect_uri', 'http://localhost:3004/auth/callback/google')
// await openAppBrowser(url.href)
}
edwinn1337
05/27/2022, 2:39 PMnkshah2
05/27/2022, 2:39 PMurl
after appending the redirect uriedwinn1337
05/27/2022, 2:53 PMedwinn1337
05/27/2022, 2:56 PMjs
await superTokensNextWrapper(
async (next) => {
await middleware()(req, res, next)
},
req,
res,
)
All I see in the logs is the 400 responsenkshah2
05/27/2022, 2:56 PMdata
propertyrp_st
05/27/2022, 2:58 PMawait superTokensNextWrapper(...)
and you will see the err in the catch blockrp_st
05/27/2022, 2:58 PMedwinn1337
05/27/2022, 3:04 PM[[...path]]
from docs hehe, let me wrap a try/catchedwinn1337
05/27/2022, 3:10 PMnkshah2
05/27/2022, 3:11 PMedwinn1337
05/27/2022, 3:13 PMedwinn1337
05/27/2022, 3:13 PMedwinn1337
05/27/2022, 3:13 PMedwinn1337
05/27/2022, 3:13 PMshop-web:dev: data: { error: 'invalid_grant', error_description: 'Bad Request' }
this error is probably expired key?rp_st
05/27/2022, 3:13 PMedwinn1337
05/27/2022, 3:14 PMrp_st
05/27/2022, 3:14 PMrp_st
05/27/2022, 3:14 PMrp_st
05/27/2022, 3:15 PMedwinn1337
05/27/2022, 3:15 PMedwinn1337
05/27/2022, 3:15 PMrp_st
05/27/2022, 3:16 PMedwinn1337
05/27/2022, 3:16 PM/auth/callback/google
page, i havent fixed any router.push yetedwinn1337
05/27/2022, 3:16 PMedwinn1337
05/27/2022, 3:16 PMedwinn1337
05/27/2022, 3:16 PMrp_st
05/27/2022, 3:16 PMrp_st
05/27/2022, 3:16 PMrp_st
05/27/2022, 3:16 PMedwinn1337
05/27/2022, 3:17 PMedwinn1337
05/27/2022, 3:17 PMedwinn1337
05/27/2022, 3:17 PMedwinn1337
05/27/2022, 3:17 PMrp_st
05/27/2022, 3:17 PMrp_st
05/27/2022, 3:18 PMedwinn1337
05/27/2022, 3:18 PMedwinn1337
05/27/2022, 3:19 PMrp_st
05/27/2022, 3:19 PMnkshah2
05/27/2022, 3:19 PMedwinn1337
05/27/2022, 3:29 PMedwinn1337
05/27/2022, 3:29 PMedwinn1337
05/27/2022, 3:29 PMedwinn1337
05/27/2022, 3:30 PMedwinn1337
05/27/2022, 3:30 PMnkshah2
05/27/2022, 3:31 PMrp_st
05/27/2022, 3:38 PM