mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.4 KiB
62 lines
2.4 KiB
key: discord
|
|
title: Discord
|
|
description: Sign in with a Discord account, optionally only from the members of one Discord server.
|
|
author: requarks.io
|
|
logo: https://static.requarks.io/logo/discord.svg
|
|
icon: /_assets/icons/ultraviolet-discord.svg
|
|
color: indigo-6
|
|
isAvailable: true
|
|
useForm: false
|
|
usernameType: email
|
|
props:
|
|
clientId:
|
|
type: String
|
|
title: Client ID
|
|
hint: From the OAuth2 page of the application registered in the Discord Developer Portal.
|
|
icon: key
|
|
order: 1
|
|
clientSecret:
|
|
type: String
|
|
title: Client Secret
|
|
hint: From the same OAuth2 page. Discord shows it once, so reset it there if it was not noted.
|
|
icon: password
|
|
sensitive: true
|
|
order: 2
|
|
serverId:
|
|
type: String
|
|
title: Restrict to Server
|
|
hint: (optional) The ID of a Discord server — turn on Developer Mode in Discord, then right-click the server and Copy Server ID. Only its members may sign in. Required to map groups, since a role belongs to a server.
|
|
icon: server
|
|
order: 3
|
|
mapGroups:
|
|
type: Boolean
|
|
title: Map Groups
|
|
hint: Put the user in the wiki groups their roles on that server name, on every login. Only groups that already exist here are matched — nothing is created. Needs a Server ID.
|
|
icon: user-groups
|
|
default: false
|
|
order: 4
|
|
botToken:
|
|
type: String
|
|
title: Bot Token
|
|
hint: (optional) A bot token for an application that is a member of the server, from the Bot page of the Developer Portal. With one, roles are matched by NAME. Without one, Discord only tells this wiki a role's numeric ID and a group here has to be named as that ID to match.
|
|
icon: bot
|
|
sensitive: true
|
|
order: 5
|
|
if:
|
|
- { key: 'mapGroups', eq: true }
|
|
unassignMissingGroups:
|
|
type: Boolean
|
|
title: Unassign from groups no longer held on the server
|
|
hint: Off adds what the roles name and takes nothing away, so a membership granted here survives. On makes the Discord server the authority instead, and a role taken away there is taken away here — bar the groups this strategy auto-enrolls into, which are granted here to everyone it lets in.
|
|
icon: unfriend
|
|
default: false
|
|
order: 6
|
|
if:
|
|
- { key: 'mapGroups', eq: true }
|
|
refs:
|
|
callbackUrl:
|
|
title: Redirect URI
|
|
hint: Add this to the application's OAuth2 redirects in the Discord Developer Portal.
|
|
icon: back
|
|
value: '{host}/_api/auth/{id}/callback'
|