logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.78k stars 442 forks source link

bug: cannot connect twitch oauth2 #6068

Closed Satont closed 1 month ago

Satont commented 4 months ago

Describe the bug

Cannot add twitch as oauth2 connector. Getting just unhelpful error from logto patch request on login.

{"message":"Error occurred in connector: {\"message\":\"{}\"}","code":"connector.general","data":{"message":"{}"}}

Expected behavior

Should at least say what is wrong.

How to reproduce?

Try to setup twitch. Also might be helpful some logging? I'm not sure logto have debug mode, but i do not see any erros in logto process console.

Context

Screenshots

image

xiaoyijun commented 4 months ago

Hi @Satont , thanks for your feedback. You can try to checkout the interaction logs in the "Audit Logs" page to see if there is some related errors.

It's a good point that some useful error messages should be returned, and we're just working on it.

Satont commented 4 months ago

@xiaoyijun ok, found audit, thanks.

But it;'s still not helpful for me.

On login i got 2 those failed logs there.

image image

xiaoyijun commented 4 months ago

Hi @Satont , since you're using the oss version, so you can try to modify the source code to print some logs.

image

then rebuild the oauth2 connector by:

cd logto/packages/connectors/connector-oauth2
pnpm build

then restart your Logto instance and try to see the logs you just added.

Satont commented 4 months ago

@xiaoyijun cannot run logto via npm init @logto

Got error, even on clean database.

info ✖ Create tables
error error: role "logto_tenant_logto" already exists
xiaoyijun commented 4 months ago

Hi @Satont , ensure you've completely cleared all related data and roles from your database. Or try to setup a new database.

xiaoyijun commented 1 month ago

Closing due to prolonged inactivity and lack of updates.