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
+29-5Lines changed: 29 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,16 @@ If you are building for mobile or web, you will need to create a login screen an
19
19
4. In the success handler call `GameSwiftSdkId.Authorize` method, which will perform all of the next steps for you automatically. Remember to use stored `GameSwiftSdkId.Instance.CmdAccessToken` here. Also, provide your `clientId` and `redirectUri`. If the process is finished successfully you will be authorized and a new `AccessToken` will be stored in the SDK's `GameSwiftSdkId.Instance.AccessToken` field. From now on you should be using this token in each request.
20
20
21
21
```cs
22
+
usingGameSwiftSDK.Core;
23
+
usingGameSwiftSDK.Id;
24
+
usingGameSwiftSDK.Id.Responses;
25
+
usingUnityEngine;
26
+
22
27
publicclassGameSwiftLauncherLogin : MonoBehaviour
23
28
{
29
+
privateconststringCLIENT_ID="yourClientId";
30
+
privateconststringREDIRECT_URI="yourRedirectUri";
31
+
24
32
privatevoidAwake()
25
33
{
26
34
if (Application.isEditor==false)
@@ -62,29 +70,47 @@ In order to authorize this way, instead of instructions described in the point 4
62
70
4. If the process is finished successfully you will be logged in, authorized and a new `AccessToken` will be stored in the SDK's `GameSwiftSdkId.Instance.AccessToken` field. From now on you should be using this token in each request.
@@ -103,7 +129,5 @@ If you don't use our recommended login approaches, remember to call `GameSwiftSd
103
129
# Hello Hero
104
130
Hello Hero is our sample application that shows how your game can be properly integrated with our SDK. In the aplication we can test requests to the `GameSwift ID` and we can see some basic results in the panel `Output`. Feel free to experiment with it!
0 commit comments