Giter Site home page Giter Site logo

keycloak-discord's Introduction

keycloak-discord

Keycloak Social Login extension for Discord.

Install

Download keycloak-discord-<version>.jar from Releases page. Then deploy it into $KEYCLOAK_HOME/providers directory.

Setup

Discord

Access to Discord Developer Portal and create your application. You can get Client ID and Client Secret from the created application.

Keycloak

Note: You don't need to setup the theme in master realm from v0.3.0.

  1. Add discord Identity Provider in the realm which you want to configure.
  2. In the discord identity provider page, set Client Id and Client Secret.
  3. (Optional) Set Guild Id(s) to allow federation if you want.

Syncing roles

To sync roles from Discord -> Keycloak, do the following:

  1. Under the discord Identity Provider, fill out Discord Roles mapping value with the roles you want synced:
  • The format is Discord-Guild-ID:Discord-Role-ID:Group-Name, like so: 613425648685547541:613426529623605268:discord-devs-moderators
  • You can specify multiple roles by separating them with commas: 613425648685547541:613426529623605268:discord-devs-moderators,613425648685547541:936746847437983786:discord-devs-modmail
  1. Set up a Mapper under the discord Identity Provider:
  • Set Mapper Type to Claim to Group Mapper
  • Set Claim to discord-groups
  • Tick Create Groups if not exists

If the above doesn't get role syncing working, fiddle around with the Sync mode override. (I have mine set to Force, so it re-imports info on every login)

Source Build

Clone this repository and run mvn package. You can see keycloak-discord-<version>.jar under target directory.

Licence

Apache License, Version 2.0

Author

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.