Skip to content
Discussion options

You must be logged in to vote

Your token looks fine. actions takes publish and/or subscribe, so ["subscribe"] with { "match": "*" } is right (the leftover mercure claim is just ignored). The problem is how the token reaches the hub.

1.0 removed the authorization query parameter. From the "Migrate token presentation" section of the upgrade guide: "The authorization query parameter is gone and has no replacement", because RFC 9700 forbids access tokens in URLs. So the hub never sees your token and answers 401.

For EventSource in the browser, which can't set headers, the replacement is the cookie. Its default name changed from mercureAuthorization to __Secure-mercure_access_token. Since you're on http://localhost, keep i…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@acelaya
Comment options

Answer selected by dunglas
Comment options

You must be logged in to vote
7 replies
@dunglas
Comment options

@acelaya
Comment options

@acelaya
Comment options

@acelaya
Comment options

@dunglas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants