You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v2/contribute/architecture/recipes.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,20 @@ A recipe is one independent auth module that can be consumed "as is". It can be
9
9
10
10
For example, the session recipe can be used as is in an app to provide it session management, but it is also used by other recipes (like emailpassword / thirdparty / emailverification) in sign in / up APIs or to know if a user is logged in on the frontend.
11
11
12
-
Other examples of recieps are:
12
+
Other examples of recipes are:
13
13
- email password login (auth recipe)
14
14
- social login (auth recipe)
15
15
- email verification
16
16
- password reset
17
17
18
18
Some recipes create users (auth recipes), whilst others work with already created users.
19
19
20
-
Recipes can also be combined together to build "super recipes". For example, we can combine emailpassword & thirdparty recipe to build thirdpartyemailpassword recipe. This way, we can provide the end user both options of Open ID connect / social login & email password login.
20
+
Recipes can also be combined to build "super recipes". For example, we can combine emailpassword & thirdparty recipe to build thirdpartyemailpassword recipe. This way, we can provide the end user both options of Open ID connect / social login & email password login.
21
21
22
22
Recipes usually span across the frontend SDK, backend SDK and the core. In each of these layers, the recipe being used is identified by a recipe ID. For example, the session recipe's RID is `session`.
23
23
24
24
Different parts of SuperTokens identify recipes using different methods. For example:
25
-
- For website navigation, th recipe ID is part of the query param of the URL
25
+
- For website navigation, the recipe ID is part of the query param of the URL
26
26
- The same website path can show different UIs based on the recipe being used. For example, `/auth?rid=emailpassword` will show the email password login, whereas `/auth?rid=thirdparty` will show the social login UI.
27
27
- For API calls (backend or to the core), the recipe ID is a header in the request with the key `rid`.
28
-
- The same API path & method can behave differently depending on the recipe being used. For example, the email password recipe can have a `/signin POST` API, which behaves differently that `/signin POST` of the magic links recipe. The backend SDK can know which behaviour to execute based on the `rid` header in the request.
28
+
- The same API path & method can behave differently depending on the recipe being used. For example, the email password recipe can have a `/signin POST` API, which behaves differently that `/signin POST` of the magic links recipe. The backend SDK can know which behaviour to execute based on the `rid` header in the request.
0 commit comments