Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add passkeys to your PHP laravel application using the Corbado passkey-first authentication solution.

NotificationsYou must be signed in to change notification settings

corbado/passkeys-php-laravel

Repository files navigation

GitHub Repo Cover

PHP Laravel Passkeys Example Application

This is a sample implementation of theCorbado passkeys-first authentication solution usingPHP Laravel. The following packages are being used:

integration-guides

File structure

  • app/Http/Controllers: contains the controllers for handling HTTP requests
  • config: contains the configuration files
  • database/migrations: contains the database migration files, including our custom user table
  • public: contains the publicly accessible files, such as assets
  • resources/views: contains the Blade templates
  • routes/web.php: contains the route definitions
  • .env: environment variables configuration file

Setup

Prerequisites

Please follow the steps inGetting started to create and configurea project in theCorbado developer panel.

You need to havePHP andComposer installed to run it.

Configure environment variables

Use the values you obtained inPrerequisites to configure the following variables inside a.envfile you create in the root folder of this project:

CORBADO_PROJECT_ID=pro-XXXCORBADO_API_SECRET=corbado1_XXXCORBADO_FRONTEND_API=https://${CORBADO_PROJECT_ID}.frontendapi.cloud.corbado.ioCORBADO_BACKEND_API=https://backendapi.cloud.corbado.io

Usage

Run the project locally

Run

composer install

to install all dependencies.

Then generate the Laravel application key and run the database migrations:

php artisan key:generatephp artisan migrate

Finally, you can run the project locally with

php artisan serve

Why the Laravel application key is required

Laravel uses theAPP_KEY (set byphp artisan key:generate) to secure encrypted data. This key is critical for:

  • Encrypting and decrypting cookies and session data
  • Generating/validating signed URLs and CSRF tokens
  • Protecting other framework-encrypted payloads

Without a validAPP_KEY, the framework cannot safely encrypt or validate data, which can cause authentication/session issues and security risks.

Passkeys support

Telemetry

This example application uses telemetry. By gathering telemetry data, we gain a more comprehensive understanding of how our SDKs, components, and example applications are utilized across various scenarios. This information is crucial in helping us prioritize features that are beneficial and impactful for the majority of our users. Read ourofficial documentation for more details.

To disable telemetry, add the following line to your.env file:

CORBADO_TELEMETRY_DISABLED=true

About

Add passkeys to your PHP laravel application using the Corbado passkey-first authentication solution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp