{"id":19565064,"url":"https://github.com/s3rious/apple-google-passkey-login-demo","last_synced_at":"2025-06-30T00:02:48.199Z","repository":{"id":246550905,"uuid":"821456251","full_name":"s3rious/apple-google-passkey-login-demo","owner":"s3rious","description":"This is a demonstration project to investigate how Apple and Google OAuth works in tandem with Passkey (also known as WebAuthN)","archived":false,"fork":false,"pushed_at":"2024-06-28T15:43:54.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T20:38:16.767Z","etag":null,"topics":["demo","oauth2","passkey","sign-in-with-apple","sign-in-with-google","webauthn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/s3rious.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,"publiccode":null,"codemeta":null}},"created_at":"2024-06-28T15:22:51.000Z","updated_at":"2024-07-03T13:31:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9a8cd00-90b7-44b5-b5ca-8b054e65e767","html_url":"https://github.com/s3rious/apple-google-passkey-login-demo","commit_stats":null,"previous_names":["s3rious/apple-google-passkey-login-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s3rious/apple-google-passkey-login-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rious%2Fapple-google-passkey-login-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rious%2Fapple-google-passkey-login-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rious%2Fapple-google-passkey-login-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rious%2Fapple-google-passkey-login-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s3rious","download_url":"https://codeload.github.com/s3rious/apple-google-passkey-login-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rious%2Fapple-google-passkey-login-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262685618,"owners_count":23348445,"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":["demo","oauth2","passkey","sign-in-with-apple","sign-in-with-google","webauthn"],"created_at":"2024-11-11T05:24:55.048Z","updated_at":"2025-06-30T00:02:48.155Z","avatar_url":"https://github.com/s3rious.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apple/Google OAuth and WebAuthN demonstration project\n\nThis is a demonstration project to investigate how Apple and Google OAuth works in tandem with Passkey (also known as WebAuthN). \nThis project is **not intended for production use** and should only be used for educational purposes.\n\n## Prerequisites\n\nBefore running the project, ensure you have the following:\n\n- Node.js (20+) and npm installed.\n- Your own `.env` file with the necessary configuration (see `.env.sample`).\n\n## Setup\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/s3rious/apple-google-passkey-login-demo.git\n    cd apple-google-passkey-login-demo\n    ```\n\n2. Install the dependencies:\n    ```sh\n    npm install\n    ```\n\n3. Create a `.env` file in the root directory with the following contents, and replace the placeholder values with your actual credentials and secrets:\n    ```plaintext\n    HTTPS_PATH_TO_CERT=path_to_cert\n    HTTPS_PATH_TO_KEY=path_to_key\n\n    ORIGIN=https://your.domain\n    JWT_SECRET=your_secret_key\n    SESSION_SECRET=your_session_secret\n\n    APPLE_CLIENT_ID=your_apple_client_id\n    APPLE_TEAM_ID=your_apple_team_id\n    APPLE_PRIVATE_KEY_ID=your_apple_private_key_id\n    APPLE_PRIVATE_KEY=your_apple_private_key\n\n    GOOGLE_CLIENT_ID=your_google_client_id\n    GOOGLE_CLIENT_SECRET=your_google_client_secret\n    ```\n\n4. Ensure you have HTTPS certificates (key and cert) and provide their paths in the `.env` file as `HTTPS_PATH_TO_KEY` and `HTTPS_PATH_TO_CERT`.\n\n5. Register your own Apple and Google applications and obtain the necessary client IDs, secrets, and keys. Provide these details in the `.env` file.\n\n## Running the Project\n\n1. Start the HTTPS server:\n    ```sh\n    npm start\n    ```\n\n2. Open your browser and navigate to the login page:\n    ```\n    https://your.domain/login\n    ```\n\n## Project Structure\n\n- `index.js`: Main server setup and route definitions.\n- `auth.js`: Basic email/password authentication routes.\n- `apple.js`: Apple OAuth routes and handlers.\n- `google.js`: Google OAuth routes and handlers.\n- `passkey.js`: Passkey (WebAuthN) routes and handlers.\n- `utils.js`: Utility functions for user data management and token authentication.\n- `public/`: Contains static files such as `login.html` and `dashboard.html`.\n\n## Key Features\n\n- **Email/Password Authentication**: Basic user registration and login using email and password.\n- **Apple OAuth**: Login and link functionality using Apple OAuth.\n- **Google OAuth**: Login and link functionality using Google OAuth.\n- **Passkey (WebAuthN)**: Registration and authentication using Passkeys.\n\n## Notes\n\n- This project uses HTTPS, so ensure your certificates are correctly configured.\n- This project is for demonstration purposes only and should not be used in a production environment.\n- Always keep your `.env` file secure and never expose it in a public repository.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3rious%2Fapple-google-passkey-login-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs3rious%2Fapple-google-passkey-login-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3rious%2Fapple-google-passkey-login-demo/lists"}