Usage
Prerequisites
- You will need a Discord account
- You will need to have the Magic SDK installed into your web app
- You will need to have the Magic SDK - OAuth Extension installed into your web app
Discord Setup
After installing the OAuth extension, you can now enable Discord Login for your Magic app:- Create a Discord API application
- Go to your Magic Dashboard
- Select the Magic app for which you’d like to enable Discord Login, or create a new app
- Navigate to Social Login from the sidebar
- Click the toggle for Discord
-
Return to your Discord developer Dashboard, navigate to OAuth2 from the sidebar, and add your Redirect URI:
Add the Redirect URI you are passing as the redirectURI argument to the loginWithRedirect method:
JavaScript

- Save your changes in the Discord OAuth2 settings
- Next, obtain the Client ID and Client Secret from the current page

- Return to your Magic Dashboard and input the Client ID and Client Secret for your Discord OAuth app
- In Magic Dashboard, click Save