Skip to content

Commit 858012d

Browse files
committed
Rewrite for new one-shot migration with client upgrade requirement
1 parent 2002c24 commit 858012d

File tree

3 files changed

+197
-217
lines changed

3 files changed

+197
-217
lines changed

docs/06-concepts/11-authentication/01-setup_new.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Serverpod comes with built-in support for authentication. It is possible to buil
44

55
Future versions of the authentication module will include more options. If you write another authentication module, please consider [contributing](/contribute) your code.
66

7-
We provide the following packages of ready-to use authentication providers. They all include a basic user profile courtesy of `serverpod_auth_profile`, and session management through `serverpod_auth_session`.
7+
We provide the following packages of ready-to-use authentication providers. They all include a basic user profile courtesy of `serverpod_auth_profile`, and session management through `serverpod_auth_session`.
88

99
|Package|Functionality|
1010
|-|-|
@@ -22,7 +22,7 @@ Just follow any of the individual authentication provider guides to set the `Aut
2222

2323
## Email
2424

25-
To get started with email based authentication, add `serverpod_auth_email` to your project. This will add a sign-up flow with email verification, and support logins and session management (through `serverpod_auth_session`). By default, this adds user profiles for each registration through `serverpod_auth_profile`.
25+
To get started with email-based authentication, add `serverpod_auth_email` to your project. This will add a sign-up flow with email verification, and support logins and session management (through `serverpod_auth_session`). By default, this adds user profiles for each registration through `serverpod_auth_profile`.
2626

2727
The only requirement for using this module is having a way to send out emails, so users can receive the initial verification email and also request a password reset later on.
2828

@@ -36,9 +36,9 @@ $ dart pub add serverpod_auth_email_server
3636
```
3737

3838

39-
As the email auth module does not expose any endpoint by default, but rather just an [`abstract` endpoint](../working-with-endpoints#endpoint-method-inheritance), a subclass of the default implementation has to be added to the current project in order to expose its APIs to outside client.
39+
As the email auth module does not expose any endpoint by default, but rather just an [`abstract` endpoint](../working-with-endpoints#endpoint-method-inheritance), a subclass of the default implementation has to be added to the current project in order to expose its APIs to clients.
4040

41-
For this add an `email_account_endpoint.dart` file to the project:
41+
For this, add an `email_account_endpoint.dart` file to the project:
4242

4343
```dart
4444
import 'package:serverpod_auth_email_server/serverpod_auth_email_server.dart'
@@ -111,9 +111,9 @@ If you're not hosting on Serverpod Cloud, you might consider an email sendout pr
111111

112112
It is up to the application to decide how to use the callbacks. Basically there are 2 primary approaches possible:
113113
- Send out the `verificationCode` and require that the client initiating the request completes the operation (account creation or password reset). In that case the user could copy/paste or retype the (short) verification into a form on the client.
114-
- Alternatively emails could contain a deep link with both the respective request ID and the verification code, which would then even support them being opened on any device (e.g. on a desktop, even if the original request was made on mobile).
114+
- Alternatively, emails could contain a deep link with both the respective request ID and the verification code, which would then even support them being opened on any device (e.g. on a desktop, even if the original request was made on mobile).
115115

116-
Additionally you need to update the `passwords.yaml` file to include secrets for both `serverpod_auth_session_sessionKeyHashPepper` and `serverpod_auth_email_account_passwordHashPepper`.
116+
Additionally, update the `passwords.yaml` file to include secrets for both `serverpod_auth_session_sessionKeyHashPepper` and `serverpod_auth_email_account_passwordHashPepper`.
117117
These should be random and at least 10 characters long. These pepper values must not be changed after the initial deployment of the server, as they are baked into every session key and stored password, and thus a rotation would invalidate previously created credentials.
118118

119119
After a restart of the Serverpod the new endpoints will be usable from the client.

0 commit comments

Comments
 (0)