Sha256: 833b614de734f9dc96cc1c12d3dea4ef053d10c8bfebfe05c4ce84698dbed817
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
# Add StrongMind Identity to a Rails app 1. Create a fresh rails app. ex: rails new my-app --css tailwind 1. Add this to Gemfile: ```ruby gem "strongmind-platform-sdk" gem 'dotenv-rails', groups: [:development, :test] # for environment variables when running locally gem 'devise' gem 'omniauth_openid_connect' gem 'omniauth-rails_csrf_protection' ``` 1. Run `bundle install` 1. Run the generator: `rails g strong_mind_rails_identity:install` 1. Execute `bin/rails db:migrate RAILS_ENV=development` 1. Create a client in the Identity Server and add the following to the .env file: ``` IDENTITY_CLIENT_ID= IDENTITY_CLIENT_SECRET= ``` 1. If you want user sessions to persist across restarts of your server in dev, and you aren't using redis in dev, add `config.cache_store = :file_store` to `config/environments/development.rb` 1. Remove the first devise line with the default devise plugins from `app/models/user.rb`. You should end up with the only devise line being ```ruby devise :omniauthable, omniauth_providers: [:strongmind] ``` 1. Start the server: `rails s`
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
strongmind-platform-sdk-2.13.0 | docs/identity_installation_in_rails.md |