[PR #384] [MERGED] feat: add passkey #553

Closed
opened 2026-02-26 21:31:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384
Author: @dreamhunter2333
Created: 8/10/2024
Status: Merged
Merged: 8/10/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

📊 Changes

17 files changed (+639 additions, -15 deletions)

View changed files

📝 CHANGELOG.md (+7 -0)
db/2024-08-10-patch.sql (+14 -0)
📝 db/schema.sql (+15 -0)
📝 frontend/package.json (+1 -0)
📝 frontend/pnpm-lock.yaml (+15 -0)
📝 frontend/src/views/user/UserLogin.vue (+36 -4)
📝 frontend/src/views/user/UserSettings.vue (+184 -7)
📝 vitepress-docs/docs/en/cli.md (+1 -1)
📝 vitepress-docs/docs/zh/guide/cli/worker.md (+1 -1)
📝 worker/package.json (+2 -0)
📝 worker/pnpm-lock.yaml (+126 -0)
📝 worker/src/models/index.ts (+15 -0)
📝 worker/src/user_api/index.ts (+15 -0)
worker/src/user_api/passkey.ts (+204 -0)
📝 worker/src/utils.ts (+0 -1)
📝 worker/src/worker.ts (+1 -0)
📝 worker/wrangler.toml.template (+2 -1)

📄 Description

PR Type

Enhancement, Documentation, Dependencies


Description

  • Added passkey login functionality to UserLogin.vue.
  • Added passkey management functionalities (create, rename, delete) to UserSettings.vue.
  • Implemented passkey API endpoints (get, rename, delete, register, authenticate) in worker/src/user_api/passkey.ts.
  • Added SQL script to create user_passkeys table.
  • Updated schema to include user_passkeys table.
  • Added dependencies for SimpleWebAuthn in frontend/package.json and worker/package.json.
  • Updated lock files to include new dependencies.
  • Documented changes related to passkey login and management in CHANGELOG.md.
  • Corrected typos in Telegram bot configuration in documentation files.

Changes walkthrough 📝

Relevant files
Enhancement
8 files
UserLogin.vue
Add passkey login functionality to UserLogin.vue                 

frontend/src/views/user/UserLogin.vue

  • Added passkey login functionality.
  • Updated i18n messages for passkey login.
  • Removed unused imports.
  • +36/-4   
    UserSettings.vue
    Add passkey management functionalities to UserSettings.vue

    frontend/src/views/user/UserSettings.vue

  • Added passkey management functionalities (create, rename, delete).
  • Updated i18n messages for passkey management.
  • Added UI components for passkey management.
  • +184/-7 
    index.ts
    Add Passkey type definition                                                           

    worker/src/models/index.ts

    • Added Passkey type definition.
    +15/-0   
    index.ts
    Add passkey API routes                                                                     

    worker/src/user_api/index.ts

    • Added routes for passkey API endpoints.
    +15/-0   
    passkey.ts
    Implement passkey API endpoints                                                   

    worker/src/user_api/passkey.ts

  • Implemented passkey API endpoints (get, rename, delete, register,
    authenticate).
  • +204/-0 
    worker.ts
    Allow unauthenticated access to passkey authentication endpoints

    worker/src/worker.ts

  • Added middleware to allow unauthenticated access to passkey
    authentication endpoints.
  • +1/-0     
    2024-08-10-patch.sql
    Add SQL script for user_passkeys table                                     

    db/2024-08-10-patch.sql

    • Added SQL script to create user_passkeys table.
    +14/-0   
    schema.sql
    Update schema to include user_passkeys table                         

    db/schema.sql

    • Updated schema to include user_passkeys table.
    +15/-0   
    Dependencies
    4 files
    package.json
    Add @simplewebauthn/browser dependency                                     

    frontend/package.json

    • Added @simplewebauthn/browser dependency.
    +1/-0     
    pnpm-lock.yaml
    Update lock file for new dependencies                                       

    frontend/pnpm-lock.yaml

  • Updated lock file to include @simplewebauthn/browser and related
    dependencies.
  • +15/-0   
    package.json
    Add @simplewebauthn/server and @simplewebauthn/types dependencies

    worker/package.json

  • Added @simplewebauthn/server and @simplewebauthn/types dependencies.
  • +2/-0     
    pnpm-lock.yaml
    Update lock file for new dependencies                                       

    worker/pnpm-lock.yaml

  • Updated lock file to include @simplewebauthn/server and related
    dependencies.
  • +126/-0 
    Documentation
    3 files
    CHANGELOG.md
    Document passkey login and management changes                       

    CHANGELOG.md

    • Documented changes related to passkey login and management.
    +7/-0     
    cli.md
    Correct typo in Telegram bot configuration                             

    vitepress-docs/docs/en/cli.md

    • Corrected typo in Telegram bot configuration.
    +1/-1     
    worker.md
    Correct typo in Telegram bot configuration                             

    vitepress-docs/docs/zh/guide/cli/worker.md

    • Corrected typo in Telegram bot configuration.
    +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 8/10/2024 **Status:** ✅ Merged **Merged:** 8/10/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`8da244c`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/8da244c7db9113e59b46be4dd1d19005531e0385) feat: add passkey ### 📊 Changes **17 files changed** (+639 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+7 -0) ➕ `db/2024-08-10-patch.sql` (+14 -0) 📝 `db/schema.sql` (+15 -0) 📝 `frontend/package.json` (+1 -0) 📝 `frontend/pnpm-lock.yaml` (+15 -0) 📝 `frontend/src/views/user/UserLogin.vue` (+36 -4) 📝 `frontend/src/views/user/UserSettings.vue` (+184 -7) 📝 `vitepress-docs/docs/en/cli.md` (+1 -1) 📝 `vitepress-docs/docs/zh/guide/cli/worker.md` (+1 -1) 📝 `worker/package.json` (+2 -0) 📝 `worker/pnpm-lock.yaml` (+126 -0) 📝 `worker/src/models/index.ts` (+15 -0) 📝 `worker/src/user_api/index.ts` (+15 -0) ➕ `worker/src/user_api/passkey.ts` (+204 -0) 📝 `worker/src/utils.ts` (+0 -1) 📝 `worker/src/worker.ts` (+1 -0) 📝 `worker/wrangler.toml.template` (+2 -1) </details> ### 📄 Description ### **PR Type** Enhancement, Documentation, Dependencies ___ ### **Description** - Added passkey login functionality to `UserLogin.vue`. - Added passkey management functionalities (create, rename, delete) to `UserSettings.vue`. - Implemented passkey API endpoints (get, rename, delete, register, authenticate) in `worker/src/user_api/passkey.ts`. - Added SQL script to create `user_passkeys` table. - Updated schema to include `user_passkeys` table. - Added dependencies for SimpleWebAuthn in `frontend/package.json` and `worker/package.json`. - Updated lock files to include new dependencies. - Documented changes related to passkey login and management in `CHANGELOG.md`. - Corrected typos in Telegram bot configuration in documentation files. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>8 files</summary><table> <tr> <td> <details> <summary><strong>UserLogin.vue</strong><dd><code>Add passkey login functionality to UserLogin.vue</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/src/views/user/UserLogin.vue <li>Added passkey login functionality.<br> <li> Updated i18n messages for passkey login.<br> <li> Removed unused imports.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-682df0c783a2d925a33928df3ff3e1d30af7937055f95cb3fcb0d26c156e228c">+36/-4</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>UserSettings.vue</strong><dd><code>Add passkey management functionalities to UserSettings.vue</code></dd></summary> <hr> frontend/src/views/user/UserSettings.vue <li>Added passkey management functionalities (create, rename, delete).<br> <li> Updated i18n messages for passkey management.<br> <li> Added UI components for passkey management.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-35f5791d54033edbf0f0213a423c946ebf050a864e91de0337b97e3c38ccc856">+184/-7</a>&nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Add Passkey type definition</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/models/index.ts - Added `Passkey` type definition. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-430bcc4ffa98738e7419c774a53ba2ce8b5127a36b3741e89bf36b95a56f02bc">+15/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Add passkey API routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/index.ts - Added routes for passkey API endpoints. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-5295b4a62dc27ad938da4f5769e8c944b01cff33c3e76ce16ebf21c6d81144d1">+15/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>passkey.ts</strong><dd><code>Implement passkey API endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/user_api/passkey.ts <li>Implemented passkey API endpoints (get, rename, delete, register, <br>authenticate).<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-cabc4dc44f7dd8ba02ec517fb6cf097f5f71e2fd01d122d55d306c119600684f">+204/-0</a>&nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.ts</strong><dd><code>Allow unauthenticated access to passkey authentication endpoints</code></dd></summary> <hr> worker/src/worker.ts <li>Added middleware to allow unauthenticated access to passkey <br>authentication endpoints.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-c007030a206d7e4e2a4879ba673551e7633ad914b67cfac204096edced3f80a2">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>2024-08-10-patch.sql</strong><dd><code>Add SQL script for user_passkeys table</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> db/2024-08-10-patch.sql - Added SQL script to create `user_passkeys` table. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-bf36a09c63085c3840009e3ac19031e7810f1fa02a8eb9a2f790a5c9510f877e">+14/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>schema.sql</strong><dd><code>Update schema to include user_passkeys table</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> db/schema.sql - Updated schema to include `user_passkeys` table. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-948c089a4de6325dd9a8f187fb0116272dedf46306023dce6d70b548e9f7539c">+15/-0</a>&nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>4 files</summary><table> <tr> <td> <details> <summary><strong>package.json</strong><dd><code>Add @simplewebauthn/browser dependency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/package.json - Added `@simplewebauthn/browser` dependency. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-da6498268e99511d9ba0df3c13e439d10556a812881c9d03955b2ef7c6c1c655">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>pnpm-lock.yaml</strong><dd><code>Update lock file for new dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> frontend/pnpm-lock.yaml <li>Updated lock file to include <code>@simplewebauthn/browser</code> and related <br>dependencies.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-41b1ff3a74ba81fa74c8dd225d66d81573be3f2990e1d98b9b09798b147d40a8">+15/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>package.json</strong><dd><code>Add @simplewebauthn/server and @simplewebauthn/types dependencies</code></dd></summary> <hr> worker/package.json <li>Added <code>@simplewebauthn/server</code> and <code>@simplewebauthn/types</code> dependencies.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-89dc6f41a53ce13f2da5a00dd34868762e6cd0df46eddc9f5c3c4510b1493870">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>pnpm-lock.yaml</strong><dd><code>Update lock file for new dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/pnpm-lock.yaml <li>Updated lock file to include <code>@simplewebauthn/server</code> and related <br>dependencies.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-b40cf923090a5fb5f6cc0d6ce716c560645419d762871abb50383fdb423288c6">+126/-0</a>&nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>3 files</summary><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Document passkey login and management changes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md - Documented changes related to passkey login and management. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+7/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>cli.md</strong><dd><code>Correct typo in Telegram bot configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/en/cli.md - Corrected typo in Telegram bot configuration. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-3f8f72a691fa19c8581621e91cf67ad28855af7a57e58513f6563cf4c8886e5f">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.md</strong><dd><code>Correct typo in Telegram bot configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/zh/guide/cli/worker.md - Corrected typo in Telegram bot configuration. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/384/files#diff-f760a2ec5dad4b6bda0bd4a9325274567778add8cb984e73650dbaaf680c9178">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:46 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#553
    No description provided.