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
@@ -98,7 +96,7 @@ You can now test if it works by signing in to your project or app.
98
96
99
97
### Email sign in
100
98
101
-
Add the `connection_id` and `login_hint` params to the auth url.
99
+
Add the `connectionId` and `loginHint` params to the auth url.
102
100
103
101
The `login_hint` enables you to pre-populate the email for the user, skipping the step where they have to enter their identity/email. It also tells us where to send their one time password for passwordless verification.
104
102
@@ -108,10 +106,8 @@ Here is an example using React.
@@ -123,22 +119,20 @@ You can now test if it works by signing in to your project or app.
123
119
124
120
### Phone sign in
125
121
126
-
Add `connection_id` and `login_hint` params to the auth url.
122
+
Add `connectionId` and `loginHint` params to the auth url.
127
123
128
-
The `login_hint` enables you to pre-populate the phone for the user, skipping the step where they have to enter their phone number. It also tells us where to send their one time password for passwordless verification.
124
+
The `loginHint` enables you to pre-populate the phone for the user, skipping the step where they have to enter their phone number. It also tells us where to send their one time password for passwordless verification.
129
125
130
-
The `login_hint` needs to be in one of these formats `phone:<intl_number>:<country_code>` or `phone:<+intl_number>:<country_code>`. The ‘+’ symbol is optional, as long as the country code is included.
126
+
The `loginHint` needs to be in one of these formats `phone:<intl_number>:<country_code>` or `phone:<+intl_number>:<country_code>`. The ‘+’ symbol is optional, as long as the country code is included.
Copy file name to clipboardExpand all lines: src/content/docs/build/applications/authenticating-spa.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
@@ -30,11 +30,11 @@ This application type does not have a client secret as authentication takes plac
30
30
4. This sample is from a React application, but it will be very similar for any frontend technology.
31
31
32
32
```jsx
33
-
const {getToken} =useKindeAuth();
33
+
const {getAccessToken} =useKindeAuth();
34
34
35
35
constfetchData=async () => {
36
36
try {
37
-
constaccessToken=awaitgetToken();
37
+
constaccessToken=awaitgetAccessToken();
38
38
constres=awaitfetch(`<your_api_endpoint>`, {
39
39
headers: {
40
40
Authorization:`Bearer ${accessToken}`
@@ -52,7 +52,7 @@ This application type does not have a client secret as authentication takes plac
52
52
53
53
You do not need to set up a back-end application in Kinde. The request sent to your API will include the access token, which gets validated when you receive it on your back end.
54
54
55
-
Validation checks the token has not expired and that the token has originated from Kinde, as well as various other checks. While it is possible to write code to check this yourself, it can be easy to miss something and accidentally introduce serious security vulnerabilities. Here’s our recommendations:
55
+
Validation checks the token has not expired and that the token has originated from Kinde, as well as various other checks. While it is possible to write code to check this yourself, it can be easy to miss something and accidentally introduce serious security vulnerabilities. Here's our recommendations:
56
56
57
57
- Use the Kinde JWT verifier for your chosen technology (if available). Our Node package is available [here](https://www.npmjs.com/package/@kinde/jwt-validator).
58
58
@@ -62,7 +62,7 @@ OR
62
62
63
63
OR
64
64
65
-
- Choose a third-party library, for example the OpenID Foundation has[a list of libraries for working with JWT tokens](https://openid.net/developers/jwt/).
65
+
- Choose a third-party library, for example the OpenID Foundation has[a list of libraries for working with JWT tokens](https://openid.net/developers/jwt/).
0 commit comments