adonisjs / ally

AdonisJS Social Authentication Provider
MIT License
159 stars 53 forks source link

Fix Authorization URL Update discord.ts #151

Closed cjpitch23 closed 5 months ago

cjpitch23 commented 5 months ago

πŸ”— Linked issue

❓ Type of change

πŸ“š Description

I have fixed the url used for Discord oath2 authorization. It required the removal of the /api part in the route in accordance with Discords OAuth2 documentation (read here: https://discord.com/developers/docs/topics/oauth2).

Furthermore, I added a parameter to the request called "integration_type" and I set the value to 1. Though the Discord documentation states that it is unnecessary unless a specific scope is being called, I kept receiving an error that said "Installation type not supported for this application". I solved it by adding the integration type and setting it to user install.

πŸ“ Checklist

I have not linked an issue or discussion, as I did not see one. I also do not believe this change will require any change to the documentation.

RomainLanz commented 5 months ago

Thanks!