I\'m trying to implement Google login in my Angular application. If I try to call api endpoint for external login server return 405 error code like this:
I had a similar problem, and since you said you already have CORS all set up in the back end, Angular not adding credentials in the API requests might be the problem. Something the browser does when you type the api endpoint in the url bar. You can use angular interceptors for adding credentials in every request. Check this: https://angular.io/guide/http#intercepting-requests-and-responses
And for your particular case, this may work:
export class CookieInterceptor implements HttpInterceptor {
intercept(request: HttpRequest, next: HttpHandler): Observable> {
request = request.clone({
withCredentials: true
});
return next.handle(request);
}
}