Skip to content

Commit

Permalink
Update readme to include new parameter for signin method
Browse files Browse the repository at this point in the history
  • Loading branch information
kaviththiranga committed Jul 29, 2024
1 parent 640b37f commit fa1a139
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ auth.getBasicUserInfo().then((response) => {
### signIn

```typescript
signIn(config?: SignInConfig, authorizationCode?: string, sessionState?: string);
signIn(config?: SignInConfig, authorizationCode?: string, sessionState?: string, tokenRequestConfig?: { params: Record<string, unknown> });
```

#### Arguments
Expand All @@ -346,6 +346,15 @@ signIn(config?: SignInConfig, authorizationCode?: string, sessionState?: string)
The `signIn` method can be passed the authorization code as an argument, which will be used to obtain the token during the token-request phase of the method. This allows developers to use different response modes such as `form_post`. To learn more about the `form_post` method refer to the [Using the `form_post` response mode](#Using-the-form_post-response-mode) section. If you're using the `query` method, then the `signIn` method automatically obtains the authorization code from the URL.
3. sessionState?: `string` (optional)
The `signIn` method can be passed the session state as an argument, which will be used to obtain the token during the token-request phase of the method. This allows developers to use different response modes such as `form_post`. To learn more about the `form_post` method refer to the [Using the `form_post` response mode](#Using-the-form_post-response-mode) section. If you're using the `query` method, then the `signIn` method automatically obtains the session state from the URL.
4. tokenRequestConfig?: `object` (optional)
An optional configuration object that allows you to augment the token request.
- `params` (Mandatory): Key-value pairs to be sent as additional parameters in the token request payload.

```TypeScript
tokenRequestConfig: {
params: Record<string, unknown>
}
```

#### Description

Expand Down

0 comments on commit fa1a139

Please sign in to comment.