{"id":18742639,"url":"https://github.com/symphonycms/members_login_oauth2","last_synced_at":"2025-11-21T05:30:16.402Z","repository":{"id":38161343,"uuid":"136362527","full_name":"symphonycms/members_login_oauth2","owner":"symphonycms","description":"Logs in users using oAuth 2","archived":false,"fork":false,"pushed_at":"2023-04-19T18:54:53.000Z","size":249,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-28T19:28:13.962Z","etag":null,"topics":["symphony-cms","symphony-cms-extension","symphony-cms-members"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/symphonycms.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-06T17:24:06.000Z","updated_at":"2020-04-01T13:58:04.000Z","dependencies_parsed_at":"2024-12-28T19:26:55.333Z","dependency_job_id":"e5e5be41-3cfc-4396-9790-84ebd87f44e4","html_url":"https://github.com/symphonycms/members_login_oauth2","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonycms%2Fmembers_login_oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonycms%2Fmembers_login_oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonycms%2Fmembers_login_oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symphonycms%2Fmembers_login_oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symphonycms","download_url":"https://codeload.github.com/symphonycms/members_login_oauth2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239622718,"owners_count":19670150,"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":["symphony-cms","symphony-cms-extension","symphony-cms-members"],"created_at":"2024-11-07T16:08:52.290Z","updated_at":"2025-11-21T05:30:16.363Z","avatar_url":"https://github.com/symphonycms.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Members: oAuth 2 Login\n\n\u003e Logs in users using oAuth 2\n\n### SPECS ###\n\nAutomatically creates account and logs in the user.\nIt uses the [oAuth 2 client from The PHP League](https://github.com/thephpleague/oauth2-client).\n\n### REQUIREMENTS ###\n\n- Symphony CMS version 2.7.x and up (as of the day of the last release of this extension)\n- Members extension version 1.9.0\n\n### INSTALLATION ###\n\n- `git clone` / download and unpack the tarball file\n- Put into the extension directory\n- Enable/install just like any other extension\n\nYou can also install it using the [extension downloader](http://symphonyextensions.com/extensions/extension_downloader/).\n\nFor more information, see \u003chttps://www.getsymphony.com/learn/tasks/view/install-an-extension/\u003e\n\n### HOW TO USE ###\n\n- Enable the extension\n- Create a new Member section with only a email field (no password)\n\t- Optionally, create a input/textarea/textbox field for the oAuth 2 username, avatar and refresh token.\n- Set the required configuration values:\n\n```php\n###### MEMBERS_OAUTH2_LOGIN ######\n'members_oauth2_login' =\u003e array(\n    'key' =\u003e 'REPLACE ME',\n    'secret' =\u003e 'REPLACE ME',\n    'redirect-uri' =\u003e 'https://yoursite.example.com/your-redirect-url/',\n    'url-authorize' =\u003e 'https://provider.example.com/your-authorize-url/',\n    'url-access-token' =\u003e 'https://provider.example.com/your-access-token-url/',\n    'url-resource-owner' =\u003e 'https://provider.example.com/your-resource-owner-url/',\n    'oauth2-email-field' =\u003e 'REPLACE ME with a field id if you want to save the oauth2 email',\n    'oauth2-username-field' =\u003e 'REPLACE ME with a field id if you want to save the oauth2 username',\n    'oauth2-avatar-field' =\u003e 'REPLACE ME with a field id if you want to save the oauth2 avatar',\n    'oauth2-refresh-token' =\u003e 'REPLACE ME with a field id if you want to save the oauth2 refresh token',\n),\n########\n```\n\n- Create a \"oAuth2\" page and attach the \"Members: oAuth 2 login\" event on it.\n- Create the login form:\n\n```html\n\u003cform action=\"/oauth2/\" method=\"POST\"\u003e\n\t\u003cinput type=\"hidden\" name=\"redirect\" value=\"/oauth2/\" /\u003e\n\t\u003cinput type=\"hidden\" name=\"members-section-id\" value=\"\u003cYour section id\u003e\" /\u003e\n\t\u003cinput type=\"hidden\" name=\"member-oauth2-action[login]\" value=\"Login\" /\u003e\n\t\u003cbutton\u003eLog in with oAuth 2 Provider\u003c/button\u003e\n\u003c/form\u003e\n```\n\nThis form will redirect the user to your oauth2 login page.\nAfter the users logs in, your oauth 2 service will redirect the user your redirect uri.\n\n- Add another form to handle the actual log in process when the user comes back from oauth2 on your redirect uri.\n\n- To make this process transparent for the end user, this form can be auto-submitted via javascript.\n\n```xslt\n\u003cxsl:if test=\"string-length(/data/params/url-oauth-token) != 0\"\u003e\n    \u003cform id=\"oauth2form\" method=\"POST\" action=\"{$current-url}/\"\u003e\n        \u003cinput type=\"hidden\" name=\"oauth_token\" value=\"{/data/params/url-oauth-token}\" /\u003e\n        \u003cinput type=\"hidden\" name=\"oauth_verifier\" value=\"{/data/params/url-oauth-verifier}\" /\u003e\n        \u003cbutton\u003eValidate\u003c/button\u003e\n    \u003c/form\u003e\n    \u003cscript\u003eif (window.oauth2form) oauth2form.submit();\u003c/script\u003e\n\u003c/xsl:if\u003e\n```\n\n- If everything works, the user will be redirected to the 'redirect' value, just like the standard Members login.\n\n- To log out the user, use the default member logout or add this form to any page:\n\n```xslt\n\u003cform id=\"oauth2logoutform\" method=\"POST\" action=\"{$current-url}/\"\u003e\n    \u003cinput type=\"hidden\" name=\"member-oauth2-action[logout]\" value=\"Logout\" /\u003e\n    \u003cbutton\u003eLogout\u003c/button\u003e\n\u003c/form\u003e\n```\n\n### SPONSOR ###\n\nThanks to [Wannes Debusschere](https://github.com/wdebusschere) for its financial contribution leading to the initial development of this extension.\n\n### LICENSE ###\n\nMIT \u003chttps://symphonycms.mit-license.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymphonycms%2Fmembers_login_oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymphonycms%2Fmembers_login_oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymphonycms%2Fmembers_login_oauth2/lists"}