#Twitch OAuth redirecting to cloud.appwrite

10 messages · Page 1 of 1 (latest)

fast kelp
#

I am creating a new app and just playing around right now.
I wanted to test the Twitch login.

I have this in my appwrite lib file:
export function initAppwrite() {
client
.setEndpoint("https://aw.mysite.com/v1")
.setProject(my_project_id);
}

export function loginWithTwitch() {
return account.createOAuth2Session(
'twitch',
"https://app.mysite.com/dashboard", // Success URL
"https://app.mysite.com/" // Failure URL
);
}

When I am clicking the login button, it is redirecting to this url:
https://cloud.appwrite.io/v1/account/sessions/oauth2/twitch?success=https%3A%2F%2Fapp.mysite.com%2Fdashboard&failure=https%3A%2F%2Fapp.mysite.com%2F&project=
With this error on page:
{"message":"Invalid success param: URL host must be one of: localhost, cloud.appwrite.io, appwrite.io","code":400,"type":"general_argument_invalid","version":"1.6.0"}

I am self hosted on 1.6.0 and twitch oauth is enabled in settings.
I imagine it shouldn't be redirecting to cloud.appwrite.io?

swift current
#

you need to add app.mysite.com as platform.

  1. Go to your Appwrite Console
  2. Select your project
  3. Scroll down until you see the integrations and add a web app with app.mysite.com

You shouldn't se the error anymore

fast kelp
#

I have that listed but no luck. Still redirects to cloud.appwrite.io
Tried with wildcard and exact subdomain.

normal bronze
#

Replace cloud.appwrite.io with your own custom domain, if you don't have one set-up, do that first.

fast kelp
#

OAuth on twitch is correct

normal bronze
fast kelp
#

Never gets to twitch, it is as soon as I click the button that runs the createOAuth2 function

normal bronze
#

Huh.. is your twitch oauth on?