Skip to content

Commit

Permalink
update changelog, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongranick-okta committed Jan 24, 2020
1 parent 3b5d7ba commit edcb2e4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- [#317](https://github.com/okta/okta-auth-js/pull/317) - `pkce` option is now `true` by default. `grantType` option is removed.

- [#320](https://github.com/okta/okta-auth-js/pull/320) - `getWithRedirect`, `getWithPopup`, and `getWithoutPrompt` take a single options object
- [#320](https://github.com/okta/okta-auth-js/pull/320) - `getWithRedirect`, `getWithPopup`, and `getWithoutPrompt` previously took 2 sets of option objects as parameters, a set of "oauthOptions" and additional options. These methods now take a single options object which can hold all available options. Passing a second options object will cause an exception to be thrown.

### Other

Expand Down
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@
* [Node JS Usage](#node-js-usage)
* [Contributing](#contributing)

The Okta Auth JavaScript SDK builds on top of our [Authentication API](https://developer.okta.com/docs/api/resources/authn) and [OAuth 2.0 API](https://developer.okta.com/docs/api/resources/oidc) to enable you to create a fully branded sign-in experience using JavaScript.
The Okta Auth JavaScript SDK builds on top of our [Authentication API](https://developer.okta.com/docs/api/resources/authn) and [OpenID Connect & OAuth 2.0 API](https://developer.okta.com/docs/api/resources/oidc) to enable you to create a fully branded sign-in experience using JavaScript.

You can learn more on the [Okta + JavaScript][lang-landing] page in our documentation.

## Release status

This library uses semantic versioning and follows Okta's [library version policy](https://developer.okta.com/code/library-versions/).

:heavy_check_mark: The current stable major version series is: `2.x`
Expand Down Expand Up @@ -155,7 +153,7 @@ var config = {
var authClient = new OktaAuth(config);
```

### [OpenID Connect](https://developer.okta.com/docs/api/resources/oidc) options
### Configuration options

These configuration options can be included when instantiating Okta Auth JS (`new OktaAuth(config)`) or in `token.getWithoutPrompt`, `token.getWithPopup`, or `token.getWithRedirect` (unless noted otherwise). If included in both, the value passed in the method takes priority.

Expand Down Expand Up @@ -372,8 +370,8 @@ var config = {
* [session.get](#sessionget)
* [session.refresh](#sessionrefresh)
* [token](#token)
* [token.getWithoutPrompt](#tokengetwithoutpromptoauthoptions)
* [token.getWithPopup](#tokengetwithpopupoauthoptions)
* [token.getWithoutPrompt](#tokengetwithoutpromptoptions)
* [token.getWithPopup](#tokengetwithpopupoptions)
* [token.getWithRedirect](#tokengetwithredirectoptions)
* [token.parseFromUrl](#tokenparsefromurloptions)
* [token.decode](#tokendecodeidtokenstring)
Expand Down Expand Up @@ -1513,7 +1511,7 @@ authClient.session.refresh()

### `token`

#### Extended OpenID Connect options
#### Authorize options

The following configuration options can **only** be included in `token.getWithoutPrompt`, `token.getWithPopup`, or `token.getWithRedirect`.

Expand All @@ -1526,8 +1524,14 @@ The following configuration options can **only** be included in `token.getWithou
| `scopes` | Specify what information to make available in the returned `id_token` or `access_token`. For OIDC, you must include `openid` as one of the scopes. Defaults to `['openid', 'email']`. For a list of available scopes, see [Scopes and Claims](https://developer.okta.com/docs/api/resources/oidc#access-token-scopes-and-claims). |
| `state` | Specify a state that will be validated in an OAuth response. This is usually only provided during redirect flows to obtain an authorization code. Defaults to a random string. |
| `nonce` | Specify a nonce that will be validated in an `id_token`. This is usually only provided during redirect flows to obtain an authorization code that will be exchanged for an `id_token`. Defaults to a random string. |
| `idp` | Identity provider to use if there is no Okta Session. |
| `idpScope` | A space delimited list of scopes to be provided to the Social Identity Provider when performing [Social Login](social-login) These scopes are used in addition to the scopes already configured on the Identity Provider. |
| `display` | The display parameter to be passed to the Social Identity Provider when performing [Social Login](social-login). |
| `prompt` | Determines whether the Okta login will be displayed on failure. Use `none` to prevent this behavior. Valid values: `none`, `consent`, `login`, or `consent login`. See [Parameter details](https://developer.okta.com/docs/reference/api/oidc/#parameter-details) for more information. |
| `maxAge` | Allowable elapsed time, in seconds, since the last time the end user was actively authenticated by Okta. |
| `loginHint` | A username to prepopulate if prompting for authentication. |

For a list of all available parameters that can be passed to the `/authorize` endpoint, see Okta's [Authorize Request API](https://developer.okta.com/docs/api/resources/oidc#request-parameters).
For more details, see Okta's [Authorize Request API](https://developer.okta.com/docs/api/resources/oidc#request-parameters).

##### Example

Expand Down Expand Up @@ -1555,11 +1559,11 @@ authClient.token.getWithoutPrompt({
});
```

#### `token.getWithoutPrompt(oauthOptions)`
#### `token.getWithoutPrompt(options)`

When you've obtained a sessionToken from the authorization flows, or a session already exists, you can obtain a token or tokens without prompting the user to log in.

* `oauthOptions` - See [Extended OpenID Connect options](#extended-openid-connect-options)
* `options` - See [Authorize options](#authorize-options)

```javascript
authClient.token.getWithoutPrompt({
Expand All @@ -1577,14 +1581,14 @@ authClient.token.getWithoutPrompt({
});
```

#### `token.getWithPopup(oauthOptions)`
#### `token.getWithPopup(options)`

Create token with a popup.

* `oauthOptions` - See [Extended OpenID Connect options](#extended-openid-connect-options)
* `options` - See [Authorize options](#authorize-options)

```javascript
authClient.token.getWithPopup(oauthOptions)
authClient.token.getWithPopup(options)
.then(function(res) {
var tokens = res.tokens;

Expand All @@ -1600,7 +1604,7 @@ authClient.token.getWithPopup(oauthOptions)

Create token using a redirect.

* `oauthOptions` - See [Extended OpenID Connect options](#extended-openid-connect-options)
* `options` - See [Authorize options](#authorize-options)

```javascript
authClient.token.getWithRedirect({
Expand Down Expand Up @@ -1927,3 +1931,4 @@ We're happy to accept contributions and PRs! Please see the [contribution guide]
[lang-landing]: https://developer.okta.com/code/javascript
[github-issues]: https://github.com/okta/okta-auth-js/issues
[github-releases]: https://github.com/okta/okta-auth-js/releases
[social-login]: https://developer.okta.com/docs/concepts/social-login/

0 comments on commit edcb2e4

Please sign in to comment.