DutchCodingCompany / filament-socialite

Add OAuth login through Laravel Socialite to Filament.
MIT License
141 stars 36 forks source link

Filament ->spa() error #67

Closed sitenzo closed 4 months ago

sitenzo commented 6 months ago

Hi,

The login (microsoft) does not work with spa() enabled on the panel. I get following error in console.

Access to fetch at 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=***********&redirect_uri=***********&scope=User.Read&response_type=code&state=***********' (redirected from 'https://***********.nl/app/oauth/microsoft') from origin 'https://***********.nl' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
bert-w commented 4 months ago

This looks like a CORS issue which you need to configure yourself. We need extra information to determine if this can be fixed in our package.

bert-w commented 4 months ago

We created a fix in the 1.3.1 release. Note that it requires Filament version ^3.2.44 in order to work (which is not a hard requirement by our package).