Skip to content

Commit

Permalink
add routeAfterAuthentication to the README
Browse files Browse the repository at this point in the history
Also I linked to the API docs on the "configurable route" text.
  • Loading branch information
mcfiredrill authored Mar 24, 2021
1 parent fa8506f commit 39c5cb7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ methods__ for handling authentication and invalidation of the session (which
not only happens when the user submits the login form or clicks the logout
button but also when the session is authenticated or invalidated in another tab
or window of the application). The `handleAuthentication` method will
transition to a configurable route while the `handleInvalidation` method will
transition to a [configurable route](http://ember-simple-auth.com/api/classes/Configuration.html) while the `handleInvalidation` method will
reload the page to clear all potentially sensitive data from memory. In order
to customize those behaviours, these methods can be overridden when the
application defines its own session service that extends the one provided by
Expand Down Expand Up @@ -341,6 +341,16 @@ export default class ApplicationAdapter extends JSONAPIAdapter {
}
```

### Redirecting to a route after authentication

Add the following to your app's config/envvironment.js file:

```js
ENV['ember-simple-auth'] = {
routeAfterAuthentication: 'dashboard',
};
```

## The Session Service

The session service is the main interface to the library. It defines the
Expand Down

0 comments on commit 39c5cb7

Please sign in to comment.