during my tests, i’ve found out twitch (or something on twitch’s side) apparently doesnt like only one scope (or empty scope) in the request. If a put more than one correct scopes, separated by a single space, and not url-encoded, everything goes well.
The error i get, which is a weird error, is this:
Fastly error: unknown domain: <my-domain-here>.com. Please check that this domain has been added to a service.
Details: cache-ams<some-number>-AMS
Which to twitch may say: my redirect URI is https://domain.com&scope=chat:read&state=somestate so you don’t pass any scopes or state to the auth page and then after the redirect something goes awry?
Thats not the case. Even changing redirect_uri’s position to the end of parameters doesnt solve the problem. Url encoding any meaningful combination of the query params doesnt help, it actually sometimes makes the error happen even when there are multiple scopes entered.
You are right, but i currently don’t have any problems with separating scopes. Everything works when there is a second scope, (it wont work if i do an extra random space at the end, when there is only one scope: scope=chat:read )
I know clientid is public, but removed it since it doesnt help.
hhhhhhhmmmmmmmmmm. I honestly don’t know where that error’s coming from although i googled it a lot. It could be from my side, but even so, i don’t think i have much control over it. Or it might be from somewhere near Twitch’s side.
From what i understood, that Fastly error comes After i redirect the user, and before calling my callback url. so at the very least its happening from outside my app (my cdn is not Fastly, but im not sure if its not coming from them)
Note that everything works 100% fine when there is more than one scopes. Callback url is called as it should, when i don’t get that error.
The problem seems to be resolved automatically. My best guess is somewhere in the process there is something passing Fastly servers, and Fastly mistakenly throws an error. I’m not sure if Fastly resolved the problem after a while (which seems likely to me) or it was just me that did something that fixed the problem (i changed some stuff due to other problems, the code is the same though and hasn’t changed).