@@ -49,7 +49,7 @@ Once you obtain a registration token from your frontend, use the `Client` to com
4949$token = 'value_from_frontend'; // $_POST['snapauth_token'] or similar
5050$userInfo = [
5151 'id' => 'your_user_id',
52- 'handle ' => 'your_user_handle ',
52+ 'username ' => 'your_username ',
5353];
5454$snapAuth->attachRegistration($token, $userInfo);
5555```
@@ -64,24 +64,24 @@ This activates the passkey and associates it with the user.
6464
6565` id ` should be some sort of _ stable_ identifer, like a database primary key.
6666
67- ` handle ` can be anything you want, or omitted entirely.
67+ ` username ` can be anything you want, or omitted entirely.
6868It's a convenience during _ client_ authentication so you don't need to look up the user id again.
6969This would commonly be the value a user provides to sign in, such as a username or email.
70+ It is _ not_ a given name.
7071
7172Both must be strings, and can be up to 255 characters long.
7273Lookups during authentication are ** case-insensitive** .
7374
7475> [ !TIP]
75- > We strongly ENCOURAGE you to obfuscate any possibly sensitive information, such as email addresses.
76- > You can accomplish this by hashing the value.
77- > Be aware that to use the handle during authentication, you will want to replicate the obfuscation procedure on your frontend.
76+ > In order to preseve user privacy, we store only a one-way hash of the ` username ` values.
77+ > As a result, we cannot return the original value in other API calls.
7878
7979### Authentication
8080
8181Like registration, you will need to obtain a token from your frontend provided by the client SDK.
8282
8383Use the ` verifyAuthToken ` method to get information about the authentication process, in the form of an ` AuthResponse ` object.
84- This object contains the previously-registered User ` id ` and ` handle ` .
84+ This object contains the previously-registered User ` id ` .
8585
8686``` php
8787$token = 'value_from_frontend'; // $_POST['snapauth_token'] or similar
0 commit comments