{"id":22329118,"url":"https://github.com/realtime-framework/website-php-auth","last_synced_at":"2026-02-12T13:06:16.005Z","repository":{"id":73122310,"uuid":"70619696","full_name":"realtime-framework/website-php-auth","owner":"realtime-framework","description":"Authenticating a Realtime token based on a successful login in a PHP server","archived":false,"fork":false,"pushed_at":"2016-10-12T11:23:20.000Z","size":424,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-02T02:47:09.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/realtime-framework.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":"2016-10-11T17:45:22.000Z","updated_at":"2019-04-10T15:08:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"5db10805-6297-4712-a065-dfbc717f2a23","html_url":"https://github.com/realtime-framework/website-php-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/realtime-framework/website-php-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2Fwebsite-php-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2Fwebsite-php-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2Fwebsite-php-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2Fwebsite-php-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realtime-framework","download_url":"https://codeload.github.com/realtime-framework/website-php-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2Fwebsite-php-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29366596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-12-04T03:14:31.655Z","updated_at":"2026-02-12T13:06:15.981Z","avatar_url":"https://github.com/realtime-framework.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Realtime HTML/REACTJS + PHP authentication\nThis example shows how to authenticate a Realtime security token based on a user successful login. The backend is coded in PHP and the client website uses React.\n\nThe login is mocked for demo purposes with the following credentials:\n\n* username: demo\n* password: demo\n \n## Demo workflow\n\n1. The user enters the login credentials\n2. An AJAX POST request is sent to the PHP backend passing the user credentials for validation\n3. The PHP backend verifies the credentials and if they are valid authenticates a Realtime token with the appropriate channel permissions\n4. The authenticated token (or error) is returned in the response body of the AJAX request\n5. The login page saves the token in the browser local storage and redirects the user to the chat page\n6. The chat page connects to Realtime using the authenticated token saved in the local storage\n\n## Running this example\n\nCopy the code to your local PHP server and open the following URL in your browser (don't forget to enter your Realtime credentials where required in the code):\n\n\thttp://localhost/phpAuth/index.html\n\n## About the Realtime Framework\nPart of the [The Realtime® Framework](http://framework.realtime.co/messaging), Realtime Cloud Messaging (aka ORTC) is a secure, fast and highly scalable cloud-hosted Pub/Sub real-time message broker for web and mobile apps.\n\nIf your application has data that needs to be updated in the user’s interface as it changes (e.g. real-time stock quotes or ever changing social news feed) Realtime Cloud Messaging is the reliable, easy, unbelievably fast, “works everywhere” solution.\n\n\n## PHP SDK Reference\n[http://messaging-public.realtime.co/documentation/php/2.1.0/Realtime.html](http://messaging-public.realtime.co/documentation/php/2.1.0/Realtime.html)\n\n\n## Authors\nRealtime.co\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2Fwebsite-php-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtime-framework%2Fwebsite-php-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2Fwebsite-php-auth/lists"}