Skip to content

Commit ec7bf74

Browse files
committed
Rearrange subsections and improve the doc view
1 parent a0f2b59 commit ec7bf74

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

docs/references/tutorials.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ Claims(
9090
)
9191
```
9292

93-
::: info NOTE
94-
9593
Not all IDPs provide the `first_name` and the `last_name` attributes already joined as in the example above, or
9694
the email in a list. So you are given the flexibility using transformer function to map the attributes as you want.
9795

@@ -104,14 +102,20 @@ flowchart LR
104102
Transform --> IDPUserData
105103
```
106104

107-
:::
108-
109105
## User provisioning
110106

111107
User provisioning refers to the process of creating, updating, and deleting user accounts within the OAuth2 IDP and
112108
synchronizing that information with your FastAPI application's database. There are two approaches to user provisioning
113109
and both require the user claims to be mapped properly for creating a new user or updating an existing one.
114110

111+
::: info NOTE
112+
113+
In both scenarios, it is recommended to use the `identity` attribute for uniquely identifying the user from the
114+
database. So if the application uses or plans to use multiple IDPs, make sure to include the `provider` attribute when
115+
calculating the `identity` attribute.
116+
117+
:::
118+
115119
### Automatic provisioning
116120

117121
After successful authentication, you can automatically create a user in your application's database using the
@@ -125,14 +129,6 @@ approach is useful when there missing mandatory attributes in `request.user` for
125129
database. You need to define a route for provisioning and provide it as `redirect_uri`, so
126130
the [user context](/integration/integration#user-context) will be available for usage.
127131

128-
::: info NOTE
129-
130-
In both scenarios, it is recommended to use the `identity` attribute for uniquely identifying the user from the
131-
database. So if the application uses or plans to use multiple IDPs, make sure to include the `provider` attribute when
132-
calculating the `identity` attribute.
133-
134-
:::
135-
136132
<style>
137133
.info, .details {
138134
border: 0;

0 commit comments

Comments
 (0)