Skip to content

Commit

Permalink
Update v2 docs to add section about accounts with session storage
Browse files Browse the repository at this point in the history
  • Loading branch information
denihs committed May 15, 2024
1 parent c38e3c7 commit 99c5102
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/source/api/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ login provider packages: `accounts-password`, `accounts-facebook`,

Read more about customizing user accounts in the [Accounts](http://guide.meteor.com/accounts.html) article in the Meteor Guide.

<h3 id="accounts-session-storage" name="accounts-session-storage">Accounts with Session Storage</h3>

By default, Meteor uses Local Storage to store, among other things, login tokens in your browser session. But, for some applications, it makes sense to use Session Storage instead. You can achieve this by adding this to your settings:

```json
{
// ... all other settings,
"public": {
// ... all your public settings
"packages": {
"accounts": {
"clientStorage": "session"
}
}
}
}
```

{% apibox "Meteor.user" %}

Retrieves the user record for the current user from
Expand Down Expand Up @@ -375,4 +393,4 @@ On the server-side, AccountsServer can also be initialized with custom parameter
}
}
}
```
```

0 comments on commit 99c5102

Please sign in to comment.