Create Discord Account

Create Discord App

  • Sign in to the Discord Developer Portal.
  • Click on New Application in the top right corner.
  • Fill in the name of your Discord Application and click Create.
  • Click on OAuth2 settings in the left menu.
  • Copy the Client ID and paste it into your Nhost OAuth settings for Discord.
  • Click on Reset Secret.
  • Click Yes, do it to generate a new secret.
  • Copy the Client Secret and paste it into your Nhost OAuth settings for Discord.
  • Click on Add Redirect.
  • Copy and paste the callback URL from your Nhost OAuth settings for Discord to the input field in the Discord Developer portal.
  • Click Save Changes to save the added callback URL.

Sign In Users

Use the Nhost JavaScript client to sign in users:

nhost.auth.signIn({
  provider: 'discord'
})

To use your own domain for the callback URL refer to the custom domains documentation.