Skip to content

Commit ade7740

Browse files
authored
add overiew info to ios and node pages (#1025)
1 parent 3bbd7a0 commit ade7740

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed

source/sdk/ios/advanced-guides/multi-user-applications.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,56 @@ Multi-User Applications - iOS SDK
1212
:depth: 2
1313
:class: singlecol
1414

15+
16+
The Realm SDK allows multiple :ref:`users <user-accounts>` to be logged in to an
17+
app simultaneously on a given device. {+service-short+} client applications run
18+
in the context of a single active user even if multiple users are logged in
19+
simultaneously. You can quickly switch between authenticated users without
20+
requiring them to log in again.
21+
22+
.. important::
23+
24+
**Any logged in user may become the active user without re-authenticating.**
25+
Depending on your app, this may be a security vulnerability. For example, a
26+
user on a shared device may switch to a coworker's logged in account without
27+
providing their credentials or requiring their explicit permission. If your
28+
application requires stricter authentication, avoid switching between users
29+
and prefer to explicitly log the active user out before authenticating
30+
another user.
31+
32+
User Account States
33+
~~~~~~~~~~~~~~~~~~~
34+
35+
When a user first logs in through a {+service-short+} SDK on a given device or
36+
browser, the SDK saves the user's information and keeps track of the user's
37+
state on the device. The user's data remains on the device, even if they log
38+
out, unless you actively :ref:`remove the user <dotnet-remove-user>`.
39+
40+
The following states describe an on-device user at any given time:
41+
42+
- **Authenticated:** any user that has logged in on the device
43+
and has not logged out or had its session revoked.
44+
45+
- **Active**: a single authenticated user that is currently using the
46+
app on a given device. The SDK associates this user with outgoing
47+
requests and {+backend-short+} evaluates data access permissions and runs
48+
functions in this user's context. See :ref:`active user <active-user>` for
49+
more information.
50+
51+
- **Inactive**: all authenticated users that are not the current
52+
active user. You can :ref:`switch the active user <dotnet-switch-user>` to a
53+
currently inactive user at any time.
54+
55+
- **Logged Out:** any user that authenticated on the device but
56+
has since logged out or had their session revoked.
57+
58+
The following diagram shows how users within a {+service-short+} client app
59+
transition between states when certain events occur:
60+
61+
.. figure:: /images/multi-user.png
62+
:alt: A diagram the outlines the different states a user can be in: logged out, logged in and active, & logged in and inactive.
63+
64+
1565
.. _ios-add-a-new-user-to-the-device:
1666

1767
Add a New User to the Device

source/sdk/node/advanced/multi-user-applications.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,55 @@ Multi-User Applications - Node.js SDK
1212
:depth: 2
1313
:class: singlecol
1414

15+
The Realm SDK allows multiple :ref:`users <user-accounts>` to be logged in to an
16+
app simultaneously on a given device. {+service-short+} client applications run
17+
in the context of a single active user even if multiple users are logged in
18+
simultaneously. You can quickly switch between authenticated users without
19+
requiring them to log in again.
20+
21+
.. important::
22+
23+
**Any logged in user may become the active user without re-authenticating.**
24+
Depending on your app, this may be a security vulnerability. For example, a
25+
user on a shared device may switch to a coworker's logged in account without
26+
providing their credentials or requiring their explicit permission. If your
27+
application requires stricter authentication, avoid switching between users
28+
and prefer to explicitly log the active user out before authenticating
29+
another user.
30+
31+
User Account States
32+
~~~~~~~~~~~~~~~~~~~
33+
34+
When a user first logs in through a {+service-short+} SDK on a given device or
35+
browser, the SDK saves the user's information and keeps track of the user's
36+
state on the device. The user's data remains on the device, even if they log
37+
out, unless you actively :ref:`remove the user <dotnet-remove-user>`.
38+
39+
The following states describe an on-device user at any given time:
40+
41+
- **Authenticated:** any user that has logged in on the device
42+
and has not logged out or had its session revoked.
43+
44+
- **Active**: a single authenticated user that is currently using the
45+
app on a given device. The SDK associates this user with outgoing
46+
requests and {+backend-short+} evaluates data access permissions and runs
47+
functions in this user's context. See :ref:`active user <active-user>` for
48+
more information.
49+
50+
- **Inactive**: all authenticated users that are not the current
51+
active user. You can :ref:`switch the active user <dotnet-switch-user>` to a
52+
currently inactive user at any time.
53+
54+
- **Logged Out:** any user that authenticated on the device but
55+
has since logged out or had their session revoked.
56+
57+
The following diagram shows how users within a {+service-short+} client app
58+
transition between states when certain events occur:
59+
60+
.. figure:: /images/multi-user.png
61+
:alt: A diagram the outlines the different states a user can be in: logged out, logged in and active, & logged in and inactive.
62+
63+
1564
.. _node-add-a-new-user-to-the-device:
1665

1766
Add a New User to the Device

0 commit comments

Comments
 (0)