Giter VIP home page Giter VIP logo

idsrv.discourse's Introduction

IdentityServer integration w/ Discourse

This sample extends IdentityServer3 with endpoints enabling SSO with a Discourse instance.

Why?

Discourse supports direct integration with Twitter, Yahoo, Google, but not a generic OpenId Connect Provider like IdentityServer3.

How?

  1. Enable SSO in Discourse
  2. Create custom endpoints integrating with IdentityServer3

1. How to setup Discourse for custom SSO:

Go to your discourse instance as an admin at /admin/site_settings/category/login, and enable SSO:

/images/discourse_sso_setup.PNG

For more information, see Discourse own docs about this.

These endpoints handle the communication between Discourse and IdentityServer3. Discourse initiates a login session by providing a payload that can be validated by using the secret and SHA256.

By using running in the idsrv pipeline, /core, we can use IdentityServer extension methods on the current context. Here, we're using the GetIdentityServerFullLoginAsync() extension. If idsrv says there is an authenticated user, we redirect back to Discource with the custom response it needs to login a user in Discourse. Otherwise, we show a login form.

Links:

idsrv.discourse's People

Contributors

johnkors avatar lsmeby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.