File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,42 @@ protected override void RefreshTokenAndCompleteCall(LootLockerServerRequest cach
43
43
} ) ;
44
44
return ;
45
45
}
46
+ case Platforms . AppleGameCenter :
46
47
case Platforms . AppleSignIn :
48
+ case Platforms . Epic :
49
+ case Platforms . Google :
47
50
{
51
+ // The failed request isn't a refresh session request but we have a refresh token stored, so try to refresh the session automatically before failing
52
+ if ( ! cacheServerRequest . jsonPayload . Contains ( "refresh_token" ) && ! string . IsNullOrEmpty ( LootLockerConfig . current . refreshToken ) )
53
+ {
54
+ switch ( CurrentPlatform . Get ( ) )
55
+ {
56
+ case Platforms . AppleGameCenter :
57
+ LootLockerSDKManager . RefreshAppleGameCenterSession ( response =>
58
+ {
59
+ CompleteCall ( cacheServerRequest , OnServerResponse , response ) ;
60
+ } ) ;
61
+ return ;
62
+ case Platforms . AppleSignIn :
63
+ LootLockerSDKManager . RefreshAppleSession ( response =>
64
+ {
65
+ CompleteCall ( cacheServerRequest , OnServerResponse , response ) ;
66
+ } ) ;
67
+ return ;
68
+ case Platforms . Epic :
69
+ LootLockerSDKManager . RefreshEpicSession ( response =>
70
+ {
71
+ CompleteCall ( cacheServerRequest , OnServerResponse , response ) ;
72
+ } ) ;
73
+ return ;
74
+ case Platforms . Google :
75
+ LootLockerSDKManager . RefreshGoogleSession ( response =>
76
+ {
77
+ CompleteCall ( cacheServerRequest , OnServerResponse , response ) ;
78
+ } ) ;
79
+ return ;
80
+ }
81
+ }
48
82
LootLockerLogger . GetForLogLevel ( LootLockerLogger . LogLevel . Warning ) ( $ "Token has expired, please refresh it") ;
49
83
LootLockerResponse res = new LootLockerResponse
50
84
{
You can’t perform that action at this time.
0 commit comments