Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/corbado/passkeys-php-laravel

Add passkeys to your PHP laravel application using the Corbado passkey-first authentication solution.
https://github.com/corbado/passkeys-php-laravel

faceid fido2 javascript laravel passkey passkeys php touchid webauthn

Last synced: 15 days ago
JSON representation

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

Awesome Lists containing this project

README

        

GitHub Repo Cover

# PHP Laravel Passkeys Example Application

This is a sample implementation of the [Corbado passkeys-first authentication solution](https://www.corbado.com) using
PHP Laravel. The following packages are being used:

- [Corbado web-js](https://github.com/corbado/javascript/tree/develop/packages/web-js)
- [Corbado PHP SDK](https://github.com/corbado/corbado-php)

## 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 in [Getting started](https://docs.corbado.com/overview/getting-started) to create and configure
a project in the [Corbado developer panel](https://app.corbado.com/).

You need to have [PHP](https://www.php.net/downloads) and [Composer](https://getcomposer.org/download/) installed to run it.

### Configure environment variables

Use the values you obtained in [Prerequisites](#prerequisites) to configure the following variables inside a `.env`
file you create in the root folder of this project:

```sh
CORBADO_PROJECT_ID=pro-XXX
CORBADO_API_SECRET=corbado1_XXX
CORBADO_FRONTEND_API=https://${CORBADO_PROJECT_ID}.frontendapi.cloud.corbado.io
CORBADO_BACKEND_API=https://backendapi.cloud.corbado.io
```

## Usage

### Run the project locally

Run

```sh
composer install
```

to install all dependencies.

Finally, you can run the project locally with

```sh
php artisan serve
```

## Passkeys support

- Community for Developer Support: https://bit.ly/passkeys-community
- Passkeys Debugger: https://www.passkeys-debugger.io/
- Passkey Subreddit: https://www.reddit.com/r/passkey/