OAuth2 auth endpoint doesn’t support AJAX by design. It’s an entry point to the authentication system, so you must get there by redirect. The result of the authentication is again a redirect to the URL you provide, so AJAX doesn’t make much sense there.
More Related Contents:
- CORS: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true
- What is the motivation behind the introduction of preflight CORS requests?
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- Same origin Policy and CORS (Cross-origin resource sharing)
- What security risks exist when setting Access-Control-Allow-Origin to accept all domains?
- API Gateway CORS: no ‘Access-Control-Allow-Origin’ header
- Cross-Domain AJAX doesn’t send X-Requested-With header
- Why do access tokens expire?
- Access denied in IE 10 and 11 when ajax target is localhost
- $http.get is not allowed by Access-Control-Allow-Origin but $.ajax is
- Set-Cookie on Browser with Ajax Request via CORS
- Sign in with Google temporarily disabled for this app
- Ajax call bug with Chrome new version 73.0.3683.75?
- Enable CORS in Golang
- client secret in OAuth 2.0
- Web sockets make ajax/CORS obsolete?
- Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at
- OAuth 2.0 with Google Analytics API v3
- Cross-Origin Request Blocked
- CORS error on same domain?
- AngularJS POST Fails: Response for preflight has invalid HTTP status code 404
- Ajax vs Socket.io
- What is AJAX, really?
- ‘No Transport’ Error w/ jQuery ajax call in IE
- Process onclick function after ajax call
- jsTree – loading subnodes via ajax on demand
- CORS issue with Google Oauth2 for server side webapps
- Returning redirect as response to Ajax (fetch, XHR, etc.) request
- What does a Ajax call response like ‘for (;;); { json data }’ mean? [duplicate]
- How to block external http requests? (securing AJAX calls)