Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shahryarjb/mishka_social
MishkaSocial is a plugin for MishkaCms as a social networking gateway
https://github.com/shahryarjb/mishka_social
authentication elixir oauth2 social
Last synced: 3 months ago
JSON representation
MishkaSocial is a plugin for MishkaCms as a social networking gateway
- Host: GitHub
- URL: https://github.com/shahryarjb/mishka_social
- Owner: shahryarjb
- License: apache-2.0
- Archived: true
- Created: 2022-03-16T08:39:11.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T19:05:03.000Z (over 2 years ago)
- Last Synced: 2024-09-30T15:43:45.637Z (3 months ago)
- Topics: authentication, elixir, oauth2, social
- Language: Elixir
- Homepage: https://hex.pm/packages/mishka_social
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MishkaSocial
MishkaSocial is a plugin for [MishkaCms](https://github.com/mishka-group/mishka-cms) as a social networking gateway## Social Auth
Authentication with social networks connection is one of important part of this library. We use Ueberauth library to do this, for example you can log in with Google and GitHub without password or registering without fulling fields.### Put these below lines to your project config file
```elixir
# ueberauth config can delete in developer pkg
config :ueberauth, Ueberauth,
base_path: "/auth",
providers: [
# For now, we need normal information of a user, but in the future it should be possible to use dynamic default_scope
# /auth/github?scope=user,public_repo
github: {Ueberauth.Strategy.Github, [default_scope: "read:user", send_redirect_uri: false]},
google: {Ueberauth.Strategy.Google, [
default_scope:
"https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
]}
]config :ueberauth, Ueberauth.Strategy.Github.OAuth,
client_id: System.get_env("GITHUB_CLIENT_ID"),
client_secret: System.get_env("GITHUB_CLIENT_SECRET")config :ueberauth, Ueberauth.Strategy.Google.OAuth,
client_id: System.get_env("GOOGLE_CLIENT_ID"),
client_secret: System.get_env("GOOGLE_CLIENT_SECRET"),
redirect_uri: System.get_env("GOOGLE_REDIRECT_URI")
```