RobSchilderr / nextjs-native-starter

One Next.js codebase for iOS, Android and Web using Capacitor, TailwindCSS and authentication with Supertokens, written in Typescript
https://nextjs-native.com
166 stars 15 forks source link

CORS problem #2

Closed marchalb closed 1 year ago

marchalb commented 1 year ago

Try to use the live example first ( https://www.next-capacitor-supertokens.app/)

But it does not seem to work because of CORS issue ..

In my console I see the following error: register:1 Access to fetch at 'https://next-capacitor-supertokens.app/api/auth/session/refresh' from origin 'https://www.next-capacitor-supertokens.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

RobSchilderr commented 1 year ago

Try to use the live example first ( https://www.next-capacitor-supertokens.app/)

But it does not seem to work because of CORS issue ..

In my console I see the following error: register:1 Access to fetch at 'https://next-capacitor-supertokens.app/api/auth/session/refresh' from origin 'https://www.next-capacitor-supertokens.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

Ah that was a Vercel issue, I had my domain configured to use www at the beginning.