{"id":19692161,"url":"https://github.com/getgrav/grav-plugin-login-oauth","last_synced_at":"2026-05-01T12:01:06.171Z","repository":{"id":68062832,"uuid":"50215379","full_name":"getgrav/grav-plugin-login-oauth","owner":"getgrav","description":"Grav Login Plugin OAuth Add-On","archived":false,"fork":false,"pushed_at":"2018-11-26T20:27:45.000Z","size":779,"stargazers_count":15,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-10-09T00:26:15.427Z","etag":null,"topics":["facebook","github","google","grav","grav-plugin","linkedin","login","login-oauth","oauth2","twitter"],"latest_commit_sha":null,"homepage":"http://getgrav.org","language":"PHP","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/getgrav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-01-23T00:08:01.000Z","updated_at":"2025-03-30T13:51:03.000Z","dependencies_parsed_at":"2023-02-22T02:00:33.249Z","dependency_job_id":null,"html_url":"https://github.com/getgrav/grav-plugin-login-oauth","commit_stats":{"total_commits":57,"total_committers":10,"mean_commits":5.7,"dds":0.6140350877192983,"last_synced_commit":"44af4fef960a8a459f2ef37ad4fe7f5a61380951"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/getgrav/grav-plugin-login-oauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-login-oauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-login-oauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-login-oauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-login-oauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getgrav","download_url":"https://codeload.github.com/getgrav/grav-plugin-login-oauth/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getgrav%2Fgrav-plugin-login-oauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32495949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["facebook","github","google","grav","grav-plugin","linkedin","login","login-oauth","oauth2","twitter"],"created_at":"2024-11-11T19:12:29.207Z","updated_at":"2026-05-01T12:01:06.125Z","avatar_url":"https://github.com/getgrav.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THIS PLUGIN IS DEPRECATED IN FAVOR OF LOGIN-OAUTH2 - https://github.com/trilbymedia/grav-plugin-login-oauth2\n\n## Grav Login Plugin OAuth Add-On\n\nThe **Grav Login Plugin OAuth Add-On** for [Grav](http://github.com/getgrav/grav) adds the ability for users to log in using Social sites.\n\nCurrently Available Providers:\n- Facebook\n- Github\n- Google\n- Twitter\n- LinkedIn\n\n## Installation\n\nThe **login-oauth** plugin actually requires the help of the **login** plugin.\n\nBoth are available via GPM, and because the plugin has dependencies you just need to proceed and install the login-oauth plugin, and agree when prompted to install the others:\n\n```\n$ bin/gpm install login-oauth\n```\n\n## Usage\n\nAdd a login-protected page, then make sure you fill the \"Route\" in the Login plugin settings. Add this route to the callback url required by the OAuth application on the service desired. Example: `http://yoursite.com/login`.\n\n\u003eNote: OAuth has not been tested with Grav's multilang feature! Due to this, certain OAuth providers may not function properly on multilang sites\n\n\u003eIMPORTANT: `localhost` may NOT be used for callback and allowed URLs when creating OAuth provider applications due to certificate verification issues. Some services allow other URLs and it may be possible to add custom domains pointing to 127.0.0.1 in your hosts file and point applications there. GitHub and Twitter are tested to work on localhost too, if it does not work you can use a tunnel like ngrok to test locally\n\n### Facebook\n\nVisit https://developers.facebook.com/quickstarts/?platform=web and create an app name then click **Create New Facebook App ID.**\n\nChoose a category most similar to your business then click **Create App ID.**\n\nScroll down on the next screen to the section titled **Tell us about your website.** Input a URL for the site (no need to include the protocol). Click **Next**\n\nClick **Skip Quick Start** Copy the **App ID** and **App Secret** into the plugin configuration under Facebook.\n\nOn the left hand side click **Settings**\nIn the **Basic** tab add your domain into the **App Domains** section as well as enter a contact email (required for facebook developer program). In the **Product Settings** menu click \"Facebook Login\". Scroll down to the **Client OAuth Settings** Make sure that **Client OAuth Login** is enabled as well as **Web OAuth Login** is enabled. In the **Valid OAuth redirect URIs** section add the routes of all pages that are protected by login. This includes the domains. EX: `http://getgrav.org/`, `http://getgrav.org/login`, `http://getgrav.org/en/login`, and `http://getgrav.org/protected/page/route`\n\n### Github\n\nVisit Github's [Developer Applications Console](https://github.com/settings/developers) and press button **Register new application** (login if necesarry). ![](assets/github/github.png)\n\nFill out the name and the URL (can be anything) and fill in the **callback**, which must be equal to where your grav site is located, generally just the host, i.e. `http://getgrav.org`. ![](assets/github/github_2.png)\n\nCopy **Client ID** and **client secret** into the plugin configuration under Github. ![](assets/github/github_3.png)Be sure to change `Github.enabled` to `true`\n\n### Google\n\nVisit the [Google Developers Console](https://console.developers.google.com) (sign in with a google account, preferably your businesses gmail).\n\nSelect **Create Project** and give the project a name (can be anything). Click **Create**. ![](assets/google/google.png)\n\nWhen it's finished creating in the left hand menu choose **Credentials** under **APIs \u0026 Auth** (you may need to click **APIs \u0026 Auth** in order to display **Credntials**). ![](assets/google/google_3.png)\n\nUnder **Add credentials** (center of screen) select **OAuth 2.0 client ID**.![](assets/google/google_4.png)\n\nThen select **Configure consent screen** in the top right corner. ![](assets/google/google_5.png)\n\nThe only requirement is **Product name** which should be the name of your website/business (not a url). You may fill in the other options as you want on the consent screen. (The consent screen can also be changed later). ![](assets/google/google_6.png)\n\nThen once you save the consent screen select **Web application** from the radio buttons and fill in the fields. **Name** being name of product/business. **Authorized Javascript origins** is the root domain name of the login page (no routes or wildcards) such as `http://getgrav.org`.\n\nIf needed, enter multiple sub domains, creating an entry for each. **Authorized redirect URIs** include the **same** Authorized Javascript origins used along with the **route** to the login page such as `http://getgrav.org/login`. Click **create**.\n\n![](assets/google/google_7.png)\n\nCopy **Client ID** and **client secret** into the plugin configuration under Google. ![](assets/google/google_8.png)Be sure to change `Google.enabled` to `true`\n\n### Twitter\n\nLogin if necessary. Create a [new Twitter App](https://apps.twitter.com/app/new) , fill out name, application website, choose \"Browser\" as application type, choose the callback URL like above, default access type can be set to read-only, click on \"Register application\" and then you should be directed to your new application with the Client ID and secret ready to be copied and pasted into the YAML file.\n\n### LinkedIn\n\nGo to [your Apps section](https://developer.linkedin.com/docs/fields/basic-profile) in LinkedIn Developers, and create an application. After that you will get a **Client ID** and a **Client Secret** of your app, copy and paste them in the config file or use the admin panel.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-login-oauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetgrav%2Fgrav-plugin-login-oauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetgrav%2Fgrav-plugin-login-oauth/lists"}