GithubHelp home page GithubHelp logo

isabella232 / mattermost-oauth2-client-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattermost/mattermost-oauth2-client-sample

0.0 0.0 0.0 88 KB

Sample app for Mattermost OAuth2 and App Center

License: Apache License 2.0

JavaScript 83.20% CSS 1.23% Handlebars 15.57%

mattermost-oauth2-client-sample's Introduction

Mattermost OAuth2 Client Sample Application

Overview

Mattermost 3.3 and later includes an OAuth2 Service Provider, enabling users with an account on a Mattermost server to sign-in to 3rd party applications.

This sample application, created in NodeJS, demonstrates how an OAuth2 client can be used with the Mattermost OAuth2 Service Provider.

Setup Server Environment

  1. Start a Mattermost Server cloned from master
  2. Create an account and a team
  3. Go To System Console -> Integrations -> OAuth2 Provider and enable the service
  4. Go back to the team you created and from the Main Menu select Integrations
  5. Add a new OAuth2 App, with http://localhost:3000/oauth/callback as the callback URL

Setup Sample App Dev Environment

  1. Clone the Github repository to run the sample
  git clone https://github.com/enahum/mattermost-sample-app.git
  cd mattermost-sample-app
  1. Install the dependencies
npm install
  1. Setup the configuration according to your server an OAuth2 App by editing config/config.json

    • mattermost_url: this is the url of your mattermost instance (eg. http://localhost:8065)
    • client_id: the client_id of the OAuth2 App that you created
    • client_secret: the client_secret of the OAuth2 App that you created

    Note: It's possible to override the settings in the config.json file by setting environment variables with the same names

  2. Once you have configured the app you can run it by issuing

npm start

The Sample App will be available under http://localhost:3000

Stop the Sample App

  1. In the terminal window press CTRL+C to stop the sample app.

mattermost-oauth2-client-sample's People

Contributors

dependabot[bot] avatar enahum avatar it33 avatar jwilander 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.