{"id":19023807,"url":"https://github.com/shinyscorpion/discourse","last_synced_at":"2025-04-23T11:15:40.751Z","repository":{"id":57490319,"uuid":"167164626","full_name":"shinyscorpion/discourse","owner":"shinyscorpion","description":"Simple Discourse library including SSO support.","archived":false,"fork":false,"pushed_at":"2019-01-24T14:08:26.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-23T11:15:34.640Z","etag":null,"topics":["discourse","discourse-sso","elixir","elixir-lang"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinyscorpion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-23T10:32:12.000Z","updated_at":"2021-11-12T15:23:24.000Z","dependencies_parsed_at":"2022-09-19T11:00:30.307Z","dependency_job_id":null,"html_url":"https://github.com/shinyscorpion/discourse","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fdiscourse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fdiscourse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fdiscourse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyscorpion%2Fdiscourse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinyscorpion","download_url":"https://codeload.github.com/shinyscorpion/discourse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250421907,"owners_count":21427851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discourse","discourse-sso","elixir","elixir-lang"],"created_at":"2024-11-08T20:33:01.282Z","updated_at":"2025-04-23T11:15:40.710Z","avatar_url":"https://github.com/shinyscorpion.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discourse\n\n[![Hex.pm](https://img.shields.io/hexpm/v/discourse.svg \"Hex\")](https://hex.pm/packages/discourse)\n[![Build Status](https://travis-ci.org/shinyscorpion/discourse.svg?branch=master)](https://travis-ci.org/shinyscorpion/discourse)\n[![Coverage Status](https://coveralls.io/repos/github/shinyscorpion/discourse/badge.svg?branch=master)](https://coveralls.io/github/shinyscorpion/discourse?branch=master)\n[![Hex.pm](https://img.shields.io/hexpm/l/discourse.svg \"License\")](LICENSE)\n\nSimple Discourse library including SSO support.\n\n## Installation\n\nThe package can be installed\nby adding `discourse` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:discourse, \"~\u003e 0.0.1\"}\n  ]\nend\n```\n\nThe docs can be found at [https://hexdocs.pm/discourse](https://hexdocs.pm/discourse).\n\n## Quick Start\n\nConfigure `:discourse`:\n```elixir\nconfig :discourse,\n  url: \"http://discuss.example.com\",\n  secret: \"d836444a9e4084d5b224a60c208dce14\"\n```\n\n### SSO\n\nHandle login request: (based on Phoenix)\n```elixir\ndefmodule MyAppWeb.UserController do\n  use MyAppWeb, :controller\n  alias Discourse.SSO\n\n  def login(conn, %{\"sso\" =\u003e sso, \"sig\" =\u003e sig}) do\n    {:ok, nonce} = SSO.validate(sso, sig)\n\n    # User login\n    user = get_session(conn, :user)\n\n    redirect(conn, external: SSO.sign_url(user.id, user.email, nonce))\n  end\nend\n```\n\n## Copyright and License\n\nCopyright (c) 2018, SQUARE ENIX LTD.\n\nDiscourse code is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyscorpion%2Fdiscourse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinyscorpion%2Fdiscourse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyscorpion%2Fdiscourse/lists"}