https://supertokens.com/ logo
Title
p

productdevbook

01/04/2023, 5:21 AM
capacitor with android app, fetch problem
ts
async function onGithubPressed() {
  const authorisationURL = props.mobile
    ? `${MOBILE_URL}/auth/callback/github`
    : `${FRONTEND_URL}/auth/callback/github`
  const authUrl = await ThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
    providerId: 'github',
    // This is where github should redirect the user back after login or error.
    // This URL goes on the github dashboard as well.
    authorisationURL,
  })
  if (props.mobile)
    window.open(authUrl, '_self')
  else
    window.location.assign(authUrl)
}
Failed to fetch
r

rp

01/04/2023, 5:22 AM
hey @productdevbook whats the full stack trace of the error?
p

productdevbook

01/04/2023, 5:24 AM
no more errors
r

rp

01/04/2023, 5:24 AM
did you google this error?
p

productdevbook

01/04/2023, 5:24 AM
github
but chrome test working pc
r

rp

01/04/2023, 5:24 AM
i meant did you search about this error on google?
p

productdevbook

01/04/2023, 5:24 AM
in android studio in app problem
hmm no, let me have a look
cors problem
r

rp

01/04/2023, 5:32 AM
this error usually means that the backend is not working or running
this is not a supertokens specific issue. So please try and debug it yourself.
p

productdevbook

01/04/2023, 5:34 AM
hmm this cors my backend thats true