You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+70-5Lines changed: 70 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,43 @@
15
15
### Supported Platforms
16
16
17
17
- Windows 10 (64-bit)
18
-
- MacOS
18
+
- MacOS (Unreal Engine 5.2+: [minimum version 12.5 Monterey](https://docs.unrealengine.com/5.2/en-US/macos-development-requirements-for-unreal-engine/))
19
+
- Android (minimum version 8.0)
20
+
- iOS (minimum version 13.0)
19
21
20
22
### Supported Unreal Engine Versions
21
23
22
24
- Unreal Engine 5.0 and above
23
25
- Unreal Engine 4.26 and above
24
26
27
+
## Registering your game
28
+
29
+
Before using Passport, you must register your application as an OAuth 2.0 **Native** client in the [Immutable Developer Hub](https://hub.immutable.com). First, you'll need to create a project and a testnet environment.
30
+
Then, you can navigate to the Passport config screen and create a passport client for your created environment.
31
+
When you're ready to launch your application on the mainnet, please ensure you configure a passport client under a mainnet environment. Here's how you can configure the fields while creating a client:
32
+
33
+
### Creating an OAuth2.0 Native client
34
+
35
+
#### Application Type
36
+
You must register your application as an OAuth 2.0 **Native** client.
37
+
38
+
#### Client name
39
+
The name you wish to use to identify your application.
40
+
41
+
#### Logout URLs
42
+
Native clients don't make use of Logout URLs, you might set your own website or https://localhost:3000 as this is a required field.
43
+
44
+
#### Callback URLs
45
+
On Android, iOS and macOS clients, you should set your application's deep link scheme (e.g. `mygame://callback`) if you wish to make use of [PKCE login](#android-and-ios-pkce-login-unreal-engine-50-only), otherwise set the same as [Logout URLs](#logout-urls).
46
+
47
+
[PKCE login](#android-and-ios-pkce-login-unreal-engine-50-only) is not supported on Windows clients. Hence, they do not use Callback URLs. You may set Callback URLs to be the same as [Logout URLs](#logout-urls), as it is a required field.
48
+
49
+
#### Web Origins URLs
50
+
Optional field. The URLs that are allowed to request authorisation. This field is available when you select the Native application type.
51
+
52
+
See [here](/docs/x/passport/register-application) for more details.
53
+
54
+
25
55
### Installation
26
56
27
57
To install the plugin download it into your project's `Plugins` folder, e.g.: `MyGame/Plugins/unreal-immutable-sdk`.
@@ -32,8 +62,6 @@ To install the plugin download it into your project's `Plugins` folder, e.g.: `M
32
62
> Please update `immutable.uplugin->Plugins->WebBrowserWidget` to false and restart your UE4 editor.
33
63
> For Unreal Engine 5.0 and above we use inbuilt browser.
34
64
35
-
36
-
37
65
### Setup
38
66
39
67
#### Blueprint
@@ -66,6 +94,42 @@ Once the gamer is connected to Passport, the SDK will store your credentials (ac
66
94
67
95
See this Blueprint showing how to logout from passport 
68
96
97
+
### Android and iOS PKCE login (Unreal Engine 5.0+ only)
98
+
99
+
For Android and iOS, you can use the [Authorization Code Flow with Proof Key for Code Exchange (PKCE)](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-proof-key-for-code-exchange-pkce) login flow instead of [Device Code Authorisation](https://auth0.com/docs/get-started/authentication-and-authorization-flow/device-authorization-flow#:~:text=Your%20Auth0%20Authorization%20Server%20redirects,authorized%20to%20access%20the%20API.). This means the gamer has one less step to complete and will be redirected back to the game after successfully authenticating.
100
+
101
+
To use this flow you will need to:
102
+
103
+
1. Define a deep link scheme for your game (e.g. `mygame://callback`)
104
+
2. Login to the [Immutable Developer Hub](https://hub.immutable.com/) and add the deeplink to your clients **Callback URLs** and **Logout URLs**
105
+
3. Set this deep link as your redirect URI in `Initialize Passport`
After this set-up and the redirect URI you set in `Initialize Passport`, your game can log in using `mygame://callback`.
130
+
131
+
See the [sample game](https://github.com/immutable/sample-unreal-game) for an example of how to set up PKCE for Android and iOS.
132
+
69
133
## Supported Functionality
70
134
71
135
@@ -74,8 +138,9 @@ See this Blueprint showing how to logout from passport |
78
142
| ConnectSilent | Attempts to login using stored credentials |
143
+
| ConnectPKCE | (Android and iOS on Unreal Engine 5.0+ only) Log into Passport using [Authorization Code Flow with Proof Key for Code Exchange (PKCE)](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-proof-key-for-code-exchange-pkce)|
79
144
80
145
81
146
See the [ImmutablePassport.h](https://github.com/immutable/unreal-immutable-sdk/blob/dc39324db204f2ba30e9c9f0ca25c070987785cb/Source/Immutable/Public/Immutable/ImmutablePassport.h#L115C8-L115C8) header for the full API.
@@ -217,4 +282,4 @@ You can also apply for marketing support for your project. Or, if you need help
217
282
218
283
## License
219
284
220
-
Immutable Unity SDK repository is distributed under the terms of the [Apache License (Version 2.0)](LICENSE).
285
+
Immutable Unity SDK repository is distributed under the terms of the [Apache License (Version 2.0)](LICENSE).
0 commit comments