https://github.com/sebouchu/br4n
Br4n - Rails application & OAuth client
https://github.com/sebouchu/br4n
Last synced: 8 months ago
JSON representation
Br4n - Rails application & OAuth client
- Host: GitHub
- URL: https://github.com/sebouchu/br4n
- Owner: SebouChu
- Created: 2022-05-06T15:41:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T15:22:06.000Z (about 4 years ago)
- Last Synced: 2025-02-03T08:01:48.130Z (over 1 year ago)
- Language: Ruby
- Size: 86.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Br4n
Rails application using [H0dor](https://github.com/SebouChu/h0dor) as identity provider through OAuth2 and OpenID Connect

## Setup
You need a configured [H0dor](https://github.com/SebouChu/h0dor) instance in your work environment.
### Basic
- Clone this repo
- Run `bin/setup`
- Run `yarn`
- Install [puma-dev](https://github.com/puma/puma-dev) if you don't have it, and redirect `br4n` to port 8001
- `echo 8001 > ~/.puma-dev/br4n`
### Environment variables
- Copy `config/application.yml.example` to `config/application.yml`
- In H0dor, create an application which will use OAuth2 for authentication
- Attributes
- Redirect URI: `https://br4n.localhost/users/auth/doorkeeper/callback`
- Confidential: `true`
- Scopes: `read`
- Then set `DOORKEEPER_OAUTH2_APP_ID` and `DOORKEEPER_OAUTH2_APP_SECRET` with the generated UID and Secret attributes.
- Still in H0dor, create an application which will use OAuth2 for authentication
- Attributes
- Redirect URI: `https://br4n.localhost/users/auth/openid_connect/callback`
- Confidential: `true`
- Scopes: `openid email profile`
- Then set `DOORKEEPER_OPENID_APP_ID` and `DOORKEEPER_OPENID_APP_SECRET` with the generated UID and Secret attributes.
## Run
```
bin/dev
```
Access it via https://br4n.localhost
## Info
This Rails application uses [Devise](https://github.com/heartcombo/devise) and [OmniAuth](https://github.com/doorkeeper-gem/doorkeeper) to sign in via OAuth2 and OpenID Connect thanks to [H0dor](https://github.com/SebouChu/h0dor).