forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test consolidated Link Identities page
- Loading branch information
1 parent
b59b8d5
commit 56fd7ed
Showing
15 changed files
with
257 additions
and
25 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
source/includes/api-details/cpp/users/link-user-identities-not-supported.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Linking credentials is not currently supported in the C++ SDK. |
4 changes: 4 additions & 0 deletions
4
source/includes/api-details/csharp/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
You can link identities using the | ||
:dotnet-sdk:`LinkCredentialsAsync() <reference/Realms.Sync.User.html#Realms_Sync_User_LinkCredentialsAsync_Realms_Sync_Credentials_>`. | ||
This links authentication providers to a logged-in | ||
:dotnet-sdk:`User <reference/Realms.Sync.User.html>` object. |
8 changes: 8 additions & 0 deletions
8
source/includes/api-details/csharp/users/link-user-identities-example.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
In the following example, we link a :ref:`Google authentication | ||
<google-authentication>` provider to a logged-in user: | ||
|
||
.. literalinclude:: /examples/generated/dotnet/UserLinkExamples.snippet.link2.cs | ||
:language: csharp | ||
|
||
In the following email/password example, we register the new :ref:`email/password | ||
<email-password-authentication>` user before linking: |
6 changes: 6 additions & 0 deletions
6
source/includes/api-details/dart/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
You can link identities by passing the :flutter-sdk:`Credentials <realm/Credentials-class.html>` | ||
that you want to link to :flutter-sdk:`User.linkCredentials() | ||
<realm/User/linkCredentials.html>`. | ||
|
||
.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.link-user-credentials.dart | ||
:language: dart |
2 changes: 2 additions & 0 deletions
2
source/includes/api-details/generic/users/link-user-identities-example.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
In the following example, we register the new :ref:`email/password | ||
<email-password-authentication>` user before linking: |
6 changes: 6 additions & 0 deletions
6
source/includes/api-details/java/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
You link identities using | ||
:java-sdk:`linkCredentials() <io/realm/mongodb/User.html#linkCredentials-io.realm.mongodb.Credentials->` | ||
or :java-sdk:`linkCredentialsAsync() | ||
<io/realm/mongodb/User.html#linkCredentialsAsync-io.realm.mongodb.Credentials-io.realm.mongodb.App.Callback->`. | ||
This links the new user identity to the logged-in :java-sdk:`User | ||
<io/realm/mongodb/User.html>` object. |
3 changes: 3 additions & 0 deletions
3
source/includes/api-details/javascript/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You can link identities using :js-sdk:`linkCredentials() | ||
<classes/User.html#linkCredentials>`. This links authentication providers | ||
to a logged-in ``User`` object. |
4 changes: 4 additions & 0 deletions
4
source/includes/api-details/kotlin/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
You link identities using | ||
:kotlin-sync-sdk:`linkCredentials <-user/link-credentials.html>`. | ||
This links the new user identity to the logged-in | ||
:kotlin-sync-sdk:`User <{-user/index.html>`. |
2 changes: 2 additions & 0 deletions
2
source/includes/api-details/objectivec/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
You can link identities using ``linkUser(credentials:Credentials)``. This | ||
links authentication providers to a logged-in ``User`` object. |
2 changes: 2 additions & 0 deletions
2
source/includes/api-details/swift/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
You can link identities using ``linkUser(credentials:Credentials)``. This | ||
links authentication providers to a logged-in ``User`` object. |
3 changes: 3 additions & 0 deletions
3
source/includes/api-details/typescript/users/link-user-identities-description.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You can link identities using :js-sdk:`linkCredentials() | ||
<classes/User.html#linkCredentials>`. This links authentication providers | ||
to a logged-in ``User`` object. |
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
source/includes/sdk-examples/users/link-user-identities-async.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. _sdk-async-await-link-user-identities: | ||
|
||
Async/Await: Swift SDK | ||
---------------------- | ||
|
||
.. versionadded:: 10.16.0 | ||
|
||
The Swift SDK provides an :swift-sdk:`async/await version of | ||
User.linkUser<Extensions/User.html#/s:So7RLMUserC10RealmSwiftE8linkUser11credentials7Combine6FutureCyABs5Error_pGAC11CredentialsO_tF>`. | ||
|
||
.. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.async-link-identity.swift | ||
:language: swift | ||
|
||
.. include:: /includes/swift-async-await-support.rst |
59 changes: 59 additions & 0 deletions
59
source/includes/sdk-examples/users/link-user-identities.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.. tabs-drivers:: | ||
|
||
tabs: | ||
- id: cpp | ||
content: | | ||
|
||
.. literalinclude:: /examples/MissingPlaceholders/api.cpp | ||
:language: cpp | ||
|
||
- id: csharp | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/dotnet/UserLinkExamples.snippet.link.cs | ||
:language: csharp | ||
|
||
- id: dart | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.link-user-credentials-example.dart | ||
:language: dart | ||
|
||
- id: java | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/java/sync/LinkUserIdentitiesTest.snippet.link-users.java | ||
:language: java | ||
|
||
- id: javascript | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/code/start/link-identities.snippet.link-identities.js | ||
:language: javascript | ||
:emphasize-lines: 6 | ||
|
||
- id: kotlin | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.link-credentials.kt | ||
:language: kotlin | ||
|
||
- id: objectivec | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.link-identity-objc.m | ||
:language: objectivec | ||
|
||
- id: swift | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.link-identity.swift | ||
:language: swift | ||
|
||
- id: typescript | ||
content: | | ||
|
||
.. literalinclude:: /examples/generated/code/start/link-identities.snippet.link-identities.ts | ||
:language: typescript | ||
:emphasize-lines: 10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters