This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-15
Channels
- # babashka (3)
- # beginners (28)
- # calva (8)
- # cider (16)
- # clj-on-windows (4)
- # clojure (69)
- # clojure-europe (29)
- # clojure-norway (42)
- # clojure-uk (4)
- # community-development (5)
- # conjure (3)
- # cursive (18)
- # datomic (68)
- # emacs (23)
- # events (1)
- # honeysql (7)
- # introduce-yourself (1)
- # jobs (1)
- # lsp (11)
- # music (1)
- # observability (3)
- # off-topic (35)
- # other-languages (33)
- # releases (1)
- # remote-jobs (2)
- # ring (18)
- # shadow-cljs (16)
- # timbre (5)
- # tools-deps (9)
When trying to authenticate with Spotify using https://github.com/weavejester/ring-oauth2, I keep getting a State mismatch
-Error although the state-query-parameter seems to match.
The url I get redirected to the auth server is
and the url I get redirected to my ring server is http://.../.../callback?code=...&state=UL4bxxxTXwcB
.
> Are you using the session middleware? I dont think so, do I need that middleware? > What routing library are you using? I use reitit.
The state check checks that the state in the url matches what is stored in the session
It may not even hit the gotchas that wrap-session has with reitit, those are if you try to share a session between routes, and there are several work around s, so not a huge problem just easy to get stuck on if you are not aware
https://github.com/metosin/reitit/issues/205#issue-399958744 talks about the issues with wrap-session and reitit and describes several solutions to making them work together
If you use a non-memory session store, wrap-session
should work fine with Reitit. Ring-Defaults will automatically add an encrypted cookie session store, for example.