{"id":19851008,"url":"https://github.com/patheard/blazer-docker","last_synced_at":"2025-06-26T09:09:05.169Z","repository":{"id":63045742,"uuid":"564811447","full_name":"patheard/blazer-docker","owner":"patheard","description":"Blazer with Devise and Google OAuth2 sign in","archived":false,"fork":false,"pushed_at":"2022-11-13T20:51:47.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T23:11:56.221Z","etag":null,"topics":["blazer","devise","google-oauth2","omniauth"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/patheard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-11T14:55:29.000Z","updated_at":"2022-11-11T20:58:22.000Z","dependencies_parsed_at":"2023-01-21T15:17:46.242Z","dependency_job_id":null,"html_url":"https://github.com/patheard/blazer-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patheard/blazer-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patheard%2Fblazer-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patheard%2Fblazer-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patheard%2Fblazer-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patheard%2Fblazer-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patheard","download_url":"https://codeload.github.com/patheard/blazer-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patheard%2Fblazer-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260452654,"owners_count":23011526,"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":["blazer","devise","google-oauth2","omniauth"],"created_at":"2024-11-12T13:28:33.193Z","updated_at":"2025-06-17T22:37:58.911Z","avatar_url":"https://github.com/patheard.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :closed_lock_with_key: Blazer with Devise and Google OAuth2 sign in\nAn example of how to use [ankane/blazer-docker](https://github.com/ankane/blazer-docker) with Devise and Google OAuth2 authentication.\n\n## Setup\n1. Create a new [OAuth 2.0 Client ID](https://console.cloud.google.com/apis/credentials):\n    - Application type: Web application\n    - Authorized JavaScript origins: `http://localhost` and `http://localhost:8080`\n    - Authorized redirect URIs: `http://localhost:8080/users/auth/google_oauth2/callback`\n1. Create a `.env` based on the `.env.example` and add your Google OAuth2 credentials.\n1. Run `docker-compose up` and access at [http://localhost:8080](http://localhost:8080).\n\nAll routes are protected by Devise, so you'll need to sign in with Google to access Blazer.  Users that are already signed into their Google account will be automatically signed in once they've accepted the consent screen.\n\n## Notes\nTo remove Google Sign-in and use server-side sign-in:\n\n1. Add `gem \"omniauth-rails_csrf_protection\"` to the [`Gemfile`](./Gemfile).\n1. Delete the [`config/initializers/omniauth.rb`](./config/initializers/omniauth.rb) file.\n1. Add a sign-in button to [`app/views/devise/sessions/new.html.erb`](./app/views/devise/sessions/new.html.erb):\n\n```ruby\n\u003c%= button_to \"Sign in with Google\", user_google_oauth2_omniauth_authorize_path, method: :post %\u003e\n```\n\n## Credits\n- [Google OAuth + Rails 5 using Devise and OmniAuth](https://medium.com/@adamlangsner/google-oauth-rails-5-using-devise-and-omniauth-1b7fa5f72c8e)\n- [How to add Google Sign In (SSO) with Devise to a Ruby on Rails 7 App](https://medium.com/dev-genius/how-to-add-google-sign-in-sso-with-devise-to-a-ruby-on-rails-7-app-6d8c5ef7641b)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatheard%2Fblazer-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatheard%2Fblazer-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatheard%2Fblazer-docker/lists"}