Skip to content

Allow sending HTTP origin header for token requests#441

Open
jimdigriz wants to merge 1 commit intomguessan:masterfrom
jimdigriz:token-origin
Open

Allow sending HTTP origin header for token requests#441
jimdigriz wants to merge 1 commit intomguessan:masterfrom
jimdigriz:token-origin

Conversation

@jimdigriz
Copy link

Some client ID's, in particularly Single Page Applications (SPAs), require that an HTTP origin header be sent to be able to exchange your code/refresh_token for an access token.

This PR allows this, discovered whilst working through #440.

To be applied after #439, this commit was originally part of that PR but it was requested that it be broken out.

@esabol
Copy link

esabol commented Jan 26, 2026

I think you (accidentally?) included the Graph fix in this PR, @jimdigriz. This PR should only have the Origin commit.

Not providing an origin can lead to:

ERROR [ImapConnection-48912] davmail.exchange.auth.O365Token  - refresh token failed invalid_request AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests. Trace ID: ... Correlation ID: ... Timestamp: ...
@jimdigriz
Copy link
Author

Doh, resolved.

Copy link

@esabol esabol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants