{"id":21465848,"url":"https://github.com/olivierluethy/php-google-login","last_synced_at":"2025-03-17T05:45:22.339Z","repository":{"id":225532328,"uuid":"599139312","full_name":"olivierluethy/PHP-Google-Login","owner":"olivierluethy","description":"A small project to login to system with google authentication","archived":false,"fork":false,"pushed_at":"2023-02-27T13:42:58.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T15:20:07.122Z","etag":null,"topics":["google-api","google-apps-script","google-login","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olivierluethy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-02-08T14:34:13.000Z","updated_at":"2024-06-20T06:31:40.000Z","dependencies_parsed_at":"2024-03-02T18:39:45.777Z","dependency_job_id":null,"html_url":"https://github.com/olivierluethy/PHP-Google-Login","commit_stats":null,"previous_names":["olivierluethy/php-google-login"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierluethy%2FPHP-Google-Login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierluethy%2FPHP-Google-Login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierluethy%2FPHP-Google-Login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivierluethy%2FPHP-Google-Login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olivierluethy","download_url":"https://codeload.github.com/olivierluethy/PHP-Google-Login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982139,"owners_count":20378606,"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":["google-api","google-apps-script","google-login","php"],"created_at":"2024-11-23T08:12:22.679Z","updated_at":"2025-03-17T05:45:22.246Z","avatar_url":"https://github.com/olivierluethy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP-Google-Login\nThis project is an implementation of a simple Google Login system in PHP.\n\n## Requirements\n1. PHP \u003e= 5.6\n2. Composer\n2. Google API Console Project with enabled Google+ API and Google OAuth 2.0 API\n\n## Setup Guide\n1. Clone this repository:\n```\ngit clone https://github.com/[username]/PHP-Google-Login.git\n```\n\n2. Navigate to the project directory:\ncd PHP-Google-Login\n\n3. Install the dependencies using Composer:\ncomposer install\n\n4. Create a new project in Google API Console.\n\n5. Enable Google+ API and Google OAuth 2.0 API for the project.\n\n6. Create a new OAuth client ID.\n\n7. Update the client ID, client secret and redirect URI in index.php:\n\n```php\n$client-\u003esetClientId('YOUR_CLIENT_ID');\n$client-\u003esetClientSecret('YOUR_CLIENT_SECRET');\n$client-\u003esetRedirectUri('YOUR_REDIRECT_URI');\n```\n\n8. Start the PHP built-in server:\n\n```cmd\nphp -S localhost:8000\n```\n\n9. Access the application in your browser at ```http://localhost:8000```.\n\n## Common Errors and Solutions\n\u003cstrong\u003eMissing dependencies:\u003c/strong\u003e\u003cbr\u003eIf you get an error related to missing classes, make sure you have installed the dependencies using Composer.\u003cbr\u003e\u003cbr\u003e\n\u003cstrong\u003eUndefined index:\u003c/strong\u003e\u003cbr\u003eIf you get an error related to undefined index in $_GET['code'], make sure that you have granted access to your Google account and the authorization code is being passed in the URL.\u003cbr\u003e\u003cbr\u003e\n\u003cstrong\u003eRedirect URI mismatch:\u003c/strong\u003e\u003cbr\u003eIf you get an error related to redirect URI mismatch, make sure that the redirect URI in your OAuth client ID configuration in Google API Console matches the one in index.php.\n\n## Troubleshooting\nIf you face any issues, feel free to create an issue in this repository or ask for help in the comments section.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivierluethy%2Fphp-google-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivierluethy%2Fphp-google-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivierluethy%2Fphp-google-login/lists"}