File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,11 +84,8 @@ The package automatically registers the following routes:
8484// config/passkeys.php
8585
8686return [
87- // Relying Party (defaults to APP_URL host and app name)
88- 'relying_party' => [
89- 'id' => parse_url(config('app.url'), PHP_URL_HOST),
90- 'name' => config('app.name'),
91- ],
87+ // Relying Party ID (defaults to APP_URL host)
88+ 'relying_party_id' => parse_url(config('app.url'), PHP_URL_HOST),
9289
9390 // WebAuthn timeout in milliseconds
9491 'timeout' => 60000,
Original file line number Diff line number Diff line change 44
55 /*
66 |--------------------------------------------------------------------------
7- | Relying Party
7+ | Relying Party ID
88 |--------------------------------------------------------------------------
99 |
10- | The relying party represents your application in the WebAuthn protocol.
11- | The ID is typically your domain (e.g., "example.com"). Passkeys are
12- | bound to this ID and can only be verified on matching domains.
10+ | The relying party ID represents your application in the WebAuthn protocol.
11+ | This is typically your domain (e.g., "example.com"). Passkeys are bound
12+ | to this ID and can only be verified on matching domains.
1313 |
1414 */
1515
16- 'relying_party ' => [
17- 'id ' => parse_url (config ('app.url ' ), PHP_URL_HOST ),
18- 'name ' => config ('app.name ' ),
19- ],
16+ 'relying_party_id ' => parse_url (config ('app.url ' ), PHP_URL_HOST ),
2017
2118 /*
2219 |--------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -35,19 +35,20 @@ class Passkeys
3535 */
3636 public static function relyingPartyId (): string
3737 {
38- $ rpId = Config::string ('passkeys.relying_party.id ' );
39-
40- return $ rpId ;
38+ return Config::string ('passkeys.relying_party_id ' );
4139 }
4240
4341 /**
4442 * Get the relying party name.
43+ *
44+ * The RP name is deprecated in the WebAuthn spec as most clients don't display it,
45+ * but remains required for backwards compatibility. Defaults to the RP ID.
46+ *
47+ * @see https://www.w3.org/TR/webauthn-3/#dom-publickeycredentialentity-name
4548 */
4649 public static function relyingPartyName (): string
4750 {
48- $ name = Config::string ('passkeys.relying_party.name ' );
49-
50- return $ name ;
51+ return static ::relyingPartyId ();
5152 }
5253
5354 /**
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ protected function defineEnvironment($app): void
2929 'database ' => ':memory: ' ,
3030 ]);
3131
32- $ app ['config ' ]->set ('passkeys.relying_party.id ' , 'localhost ' );
33- $ app ['config ' ]->set ('passkeys.relying_party.name ' , 'Test App ' );
32+ $ app ['config ' ]->set ('passkeys.relying_party_id ' , 'localhost ' );
3433 $ app ['config ' ]->set ('auth.providers.users.model ' , User::class);
3534
3635 Passkeys::useUserModel (User::class);
You can’t perform that action at this time.
0 commit comments