diff --git a/sample/Assets/Scenes/Passport/UnauthenticatedScene.unity b/sample/Assets/Scenes/Passport/UnauthenticatedScene.unity
index 1350ad71e..d1352fc56 100644
--- a/sample/Assets/Scenes/Passport/UnauthenticatedScene.unity
+++ b/sample/Assets/Scenes/Passport/UnauthenticatedScene.unity
@@ -203,6 +203,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 415205}
m_CullTransparentMesh: 1
+--- !u!1 &24934967
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 24934968}
+ - component: {fileID: 24934970}
+ - component: {fileID: 24934969}
+ m_Layer: 5
+ m_Name: Text (Legacy)
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &24934968
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 24934967}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 2039894466}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &24934969
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 24934967}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 24
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 0
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: Login (Facebook)
+--- !u!222 &24934970
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 24934967}
+ m_CullTransparentMesh: 1
--- !u!1 &270318904
GameObject:
m_ObjectHideFlags: 0
@@ -371,11 +451,11 @@ RectTransform:
m_Children:
- {fileID: 415206}
m_Father: {fileID: 1349788404}
- m_RootOrder: 1
+ m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 406, y: -30}
+ m_AnchoredPosition: {x: 1234, y: -30}
m_SizeDelta: {x: 260, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &291915220
@@ -492,6 +572,149 @@ MonoBehaviour:
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
+--- !u!1 &299078108
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 299078109}
+ - component: {fileID: 299078112}
+ - component: {fileID: 299078111}
+ - component: {fileID: 299078113}
+ - component: {fileID: 299078110}
+ m_Layer: 5
+ m_Name: LoginGoogleBtn
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &299078109
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 299078108}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 1518390037}
+ m_Father: {fileID: 1349788404}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 406, y: -30}
+ m_SizeDelta: {x: 260, y: 60}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &299078110
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 299078108}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_IgnoreLayout: 0
+ m_MinWidth: -1
+ m_MinHeight: -1
+ m_PreferredWidth: 260
+ m_PreferredHeight: 60
+ m_FlexibleWidth: -1
+ m_FlexibleHeight: -1
+ m_LayoutPriority: 1
+--- !u!114 &299078111
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 299078108}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &299078112
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 299078108}
+ m_CullTransparentMesh: 1
+--- !u!114 &299078113
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 299078108}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 299078111}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
--- !u!1 &308272458
GameObject:
m_ObjectHideFlags: 0
@@ -1377,8 +1600,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 852.55914, y: -130}
- m_SizeDelta: {x: 1665.1183, y: 60}
+ m_AnchoredPosition: {x: 904.80835, y: -130}
+ m_SizeDelta: {x: 1769.6167, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &756533209
MonoBehaviour:
@@ -1812,19 +2035,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 892906555}
m_OnClick:
m_PersistentCalls:
- m_Calls:
- - m_Target: {fileID: 1883395344}
- m_TargetAssemblyTypeName: LoginScript, Assembly-CSharp
- m_MethodName: Login
- m_Mode: 1
- m_Arguments:
- m_ObjectArgument: {fileID: 0}
- m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
- m_IntArgument: 0
- m_FloatArgument: 0
- m_StringArgument:
- m_BoolArgument: 0
- m_CallState: 2
+ m_Calls: []
--- !u!114 &892906555
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1883,7 +2094,7 @@ MonoBehaviour:
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
---- !u!1 &959482241
+--- !u!1 &944747496
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -1891,44 +2102,46 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- - component: {fileID: 959482242}
- - component: {fileID: 959482244}
- - component: {fileID: 959482243}
+ - component: {fileID: 944747497}
+ - component: {fileID: 944747500}
+ - component: {fileID: 944747499}
+ - component: {fileID: 944747501}
+ - component: {fileID: 944747498}
m_Layer: 5
- m_Name: ClearStorageCacheWrapper
+ m_Name: LoginAppleBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
---- !u!224 &959482242
+--- !u!224 &944747497
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 959482241}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_GameObject: {fileID: 944747496}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- - {fileID: 1582459301}
- m_Father: {fileID: 997036539}
- m_RootOrder: 4
+ - {fileID: 1755589636}
+ m_Father: {fileID: 1349788404}
+ m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 0, y: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 682, y: -30}
+ m_SizeDelta: {x: 260, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &959482243
+--- !u!114 &944747498
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 959482241}
+ m_GameObject: {fileID: 944747496}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
@@ -1937,44 +2150,185 @@ MonoBehaviour:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: -1
- m_PreferredWidth: -1
+ m_PreferredWidth: 260
m_PreferredHeight: 60
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
---- !u!114 &959482244
+--- !u!114 &944747499
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 959482241}
+ m_GameObject: {fileID: 944747496}
m_Enabled: 1
m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
- m_Padding:
- m_Left: 0
- m_Right: 0
- m_Top: 0
- m_Bottom: 0
- m_ChildAlignment: 3
- m_Spacing: 0
- m_ChildForceExpandWidth: 0
- m_ChildForceExpandHeight: 0
- m_ChildControlWidth: 0
- m_ChildControlHeight: 0
- m_ChildScaleWidth: 1
- m_ChildScaleHeight: 1
- m_ReverseArrangement: 0
---- !u!1 &997036538
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &944747500
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 944747496}
+ m_CullTransparentMesh: 1
+--- !u!114 &944747501
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 944747496}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 944747499}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
+--- !u!1 &959482241
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 959482242}
+ - component: {fileID: 959482244}
+ - component: {fileID: 959482243}
+ m_Layer: 5
+ m_Name: ClearStorageCacheWrapper
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &959482242
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 959482241}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 1582459301}
+ m_Father: {fileID: 997036539}
+ m_RootOrder: 4
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &959482243
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 959482241}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_IgnoreLayout: 0
+ m_MinWidth: -1
+ m_MinHeight: -1
+ m_PreferredWidth: -1
+ m_PreferredHeight: 60
+ m_FlexibleWidth: -1
+ m_FlexibleHeight: -1
+ m_LayoutPriority: 1
+--- !u!114 &959482244
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 959482241}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Padding:
+ m_Left: 0
+ m_Right: 0
+ m_Top: 0
+ m_Bottom: 0
+ m_ChildAlignment: 3
+ m_Spacing: 0
+ m_ChildForceExpandWidth: 0
+ m_ChildForceExpandHeight: 0
+ m_ChildControlWidth: 0
+ m_ChildControlHeight: 0
+ m_ChildScaleWidth: 1
+ m_ChildScaleHeight: 1
+ m_ReverseArrangement: 0
+--- !u!1 &997036538
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
m_Component:
- component: {fileID: 997036539}
- component: {fileID: 997036540}
@@ -2134,7 +2488,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1495172582}
m_HandleRect: {fileID: 1495172581}
m_Direction: 2
- m_Value: 1
+ m_Value: 0
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
@@ -2341,7 +2695,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
LoginButtons: {fileID: 1349788403}
ReloginButtons: {fileID: 756533207}
- DeviceCodeTimeoutMs: {fileID: 0}
--- !u!1 &1173574366
GameObject:
m_ObjectHideFlags: 0
@@ -2453,14 +2806,17 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 892906553}
+ - {fileID: 299078109}
+ - {fileID: 944747497}
+ - {fileID: 2039894466}
- {fileID: 291915219}
m_Father: {fileID: 997036539}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
- m_AnchoredPosition: {x: 1108.9248, y: -130}
- m_SizeDelta: {x: 2177.8496, y: 60}
+ m_AnchoredPosition: {x: 904.80835, y: -130}
+ m_SizeDelta: {x: 1769.6167, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1349788406
MonoBehaviour:
@@ -2640,6 +2996,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1495172580}
m_CullTransparentMesh: 1
+--- !u!1 &1518390036
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1518390037}
+ - component: {fileID: 1518390039}
+ - component: {fileID: 1518390038}
+ m_Layer: 5
+ m_Name: Text (Legacy)
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1518390037
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1518390036}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 299078109}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1518390038
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1518390036}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 24
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 0
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: Login (Google)
+--- !u!222 &1518390039
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1518390036}
+ m_CullTransparentMesh: 1
--- !u!1 &1541372190
GameObject:
m_ObjectHideFlags: 0
@@ -3079,6 +3515,86 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1661390143}
m_CullTransparentMesh: 1
+--- !u!1 &1755589635
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1755589636}
+ - component: {fileID: 1755589638}
+ - component: {fileID: 1755589637}
+ m_Layer: 5
+ m_Name: Text (Legacy)
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1755589636
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1755589635}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 944747497}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 1, y: 1}
+ m_AnchoredPosition: {x: 0, y: 0}
+ m_SizeDelta: {x: 0, y: 0}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1755589637
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1755589635}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 24
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 0
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: Login (Apple)
+--- !u!222 &1755589638
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1755589635}
+ m_CullTransparentMesh: 1
--- !u!1 &1850628783
GameObject:
m_ObjectHideFlags: 0
@@ -3265,7 +3781,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
Output: {fileID: 1615533291}
- DeviceCodeTimeoutMs: {fileID: 0}
+ AppleLoginButton: {fileID: 944747501}
+ GoogleLoginButton: {fileID: 299078113}
+ FacebookLoginButton: {fileID: 2039894470}
+ DefaultLoginButton: {fileID: 892906554}
--- !u!4 &1883395345
Transform:
m_ObjectHideFlags: 0
@@ -3318,3 +3837,146 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: -20}
m_Pivot: {x: 0.5, y: 0.5}
+--- !u!1 &2039894465
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2039894466}
+ - component: {fileID: 2039894469}
+ - component: {fileID: 2039894468}
+ - component: {fileID: 2039894470}
+ - component: {fileID: 2039894467}
+ m_Layer: 5
+ m_Name: LoginFacebookBtn
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2039894466
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2039894465}
+ m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children:
+ - {fileID: 24934968}
+ m_Father: {fileID: 1349788404}
+ m_RootOrder: 3
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 1}
+ m_AnchorMax: {x: 0, y: 1}
+ m_AnchoredPosition: {x: 958, y: -30}
+ m_SizeDelta: {x: 260, y: 60}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &2039894467
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2039894465}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_IgnoreLayout: 0
+ m_MinWidth: -1
+ m_MinHeight: -1
+ m_PreferredWidth: 260
+ m_PreferredHeight: 60
+ m_FlexibleWidth: -1
+ m_FlexibleHeight: -1
+ m_LayoutPriority: 1
+--- !u!114 &2039894468
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2039894465}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 1
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+ m_Type: 1
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!222 &2039894469
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2039894465}
+ m_CullTransparentMesh: 1
+--- !u!114 &2039894470
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2039894465}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Navigation:
+ m_Mode: 3
+ m_WrapAround: 0
+ m_SelectOnUp: {fileID: 0}
+ m_SelectOnDown: {fileID: 0}
+ m_SelectOnLeft: {fileID: 0}
+ m_SelectOnRight: {fileID: 0}
+ m_Transition: 1
+ m_Colors:
+ m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+ m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+ m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+ m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+ m_ColorMultiplier: 1
+ m_FadeDuration: 0.1
+ m_SpriteState:
+ m_HighlightedSprite: {fileID: 0}
+ m_PressedSprite: {fileID: 0}
+ m_SelectedSprite: {fileID: 0}
+ m_DisabledSprite: {fileID: 0}
+ m_AnimationTriggers:
+ m_NormalTrigger: Normal
+ m_HighlightedTrigger: Highlighted
+ m_PressedTrigger: Pressed
+ m_SelectedTrigger: Selected
+ m_DisabledTrigger: Disabled
+ m_Interactable: 1
+ m_TargetGraphic: {fileID: 2039894468}
+ m_OnClick:
+ m_PersistentCalls:
+ m_Calls: []
diff --git a/sample/Assets/Scripts/Passport/Login/LoginScript.cs b/sample/Assets/Scripts/Passport/Login/LoginScript.cs
index f14b53a82..1fe324fb2 100644
--- a/sample/Assets/Scripts/Passport/Login/LoginScript.cs
+++ b/sample/Assets/Scripts/Passport/Login/LoginScript.cs
@@ -3,11 +3,16 @@
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using Immutable.Passport;
+using Immutable.Passport.Model;
public class LoginScript : MonoBehaviour
{
#pragma warning disable CS8618
[SerializeField] private Text Output;
+ [SerializeField] private Button DefaultLoginButton;
+ [SerializeField] private Button GoogleLoginButton;
+ [SerializeField] private Button AppleLoginButton;
+ [SerializeField] private Button FacebookLoginButton;
private Passport Passport;
#pragma warning restore CS8618
@@ -21,25 +26,61 @@ void Start()
{
ShowOutput("Passport Instance is null");
}
+
+ // Set up button listeners if buttons are assigned
+ if (DefaultLoginButton != null) DefaultLoginButton.onClick.AddListener(() => Login(DirectLoginMethod.None));
+ if (GoogleLoginButton != null) GoogleLoginButton.onClick.AddListener(() => Login(DirectLoginMethod.Google));
+ if (AppleLoginButton != null) AppleLoginButton.onClick.AddListener(() => Login(DirectLoginMethod.Apple));
+ if (FacebookLoginButton != null) FacebookLoginButton.onClick.AddListener(() => Login(DirectLoginMethod.Facebook));
}
///
- /// Logs into Passport using the selected auth method.
+ /// Logs into Passport using the default auth method.
///
public async void Login()
+ {
+ await LoginAsync(DirectLoginMethod.None);
+ }
+
+ ///
+ /// Logs into Passport using the specified direct login method.
+ ///
+ /// The direct login method to use (Google, Apple, Facebook, or None for default)
+ public async void Login(DirectLoginMethod directLoginMethod)
+ {
+ await LoginAsync(directLoginMethod);
+ }
+
+ ///
+ /// Internal async method that performs the actual login logic.
+ ///
+ /// The direct login method to use
+ private async System.Threading.Tasks.Task LoginAsync(DirectLoginMethod directLoginMethod)
{
try
{
- await Passport.Login();
- SceneManager.LoadScene("AuthenticatedScene");
+ string methodName = directLoginMethod == DirectLoginMethod.None ? "default" : directLoginMethod.ToString();
+ ShowOutput($"Logging in with {methodName} method...");
+
+ bool success = await Passport.Login(useCachedSession: false, directLoginMethod: directLoginMethod);
+
+ if (success)
+ {
+ ShowOutput($"Successfully logged in with {methodName}");
+ SceneManager.LoadScene("AuthenticatedScene");
+ }
+ else
+ {
+ ShowOutput($"Failed to log in with {methodName}");
+ }
}
catch (OperationCanceledException ex)
{
- ShowOutput($"Failed to login: cancelled {ex.Message}\\n{ex.StackTrace}");
+ ShowOutput($"Login cancelled: {ex.Message}");
}
catch (Exception ex)
{
- ShowOutput($"Failed to login: {ex.Message}");
+ ShowOutput($"Login failed: {ex.Message}");
}
}
@@ -49,5 +90,7 @@ private void ShowOutput(string message)
{
Output.text = message;
}
+
+ Debug.Log($"[LoginScript] {message}");
}
}
\ No newline at end of file
diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginMethod.cs b/src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginMethod.cs
new file mode 100644
index 000000000..b844059ee
--- /dev/null
+++ b/src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginMethod.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace Immutable.Passport.Model
+{
+ ///
+ /// Enum for direct login methods supported by Passport.
+ ///
+ [Serializable]
+ public enum DirectLoginMethod
+ {
+ None,
+ Google,
+ Apple,
+ Facebook
+ }
+}
\ No newline at end of file
diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginMethod.cs.meta b/src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginMethod.cs.meta
new file mode 100644
index 000000000..f383fcba2
--- /dev/null
+++ b/src/Packages/Passport/Runtime/Scripts/Private/Model/DirectLoginMethod.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9b18620db477c459982b693c3c87e04a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/GetPKCEAuthUrlRequest.cs b/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/GetPKCEAuthUrlRequest.cs
new file mode 100644
index 000000000..d2d2643c3
--- /dev/null
+++ b/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/GetPKCEAuthUrlRequest.cs
@@ -0,0 +1,32 @@
+using System;
+
+namespace Immutable.Passport.Model
+{
+ ///
+ /// Request model for getting PKCE authentication URL.
+ ///
+ [Serializable]
+ internal class GetPKCEAuthUrlRequest
+ {
+ ///
+ /// Whether this is a connect to IMX operation (true) or just login (false).
+ ///
+ public bool isConnectImx;
+
+ ///
+ /// The direct login method to use for authentication.
+ ///
+ public string directLoginMethod;
+
+ ///
+ /// Creates a new GetPKCEAuthUrlRequest.
+ ///
+ /// Whether this is a connect to IMX operation
+ /// The direct login method to use
+ public GetPKCEAuthUrlRequest(bool isConnectImx, DirectLoginMethod directLoginMethod)
+ {
+ this.isConnectImx = isConnectImx;
+ this.directLoginMethod = directLoginMethod == DirectLoginMethod.None ? null : directLoginMethod.ToString().ToLower();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/GetPKCEAuthUrlRequest.cs.meta b/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/GetPKCEAuthUrlRequest.cs.meta
new file mode 100644
index 000000000..79e894fb6
--- /dev/null
+++ b/src/Packages/Passport/Runtime/Scripts/Private/Model/Request/GetPKCEAuthUrlRequest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d2e864c55a7d6438998e4b05688fe485
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs b/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs
index 46acdec0b..2b12f4add 100644
--- a/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs
+++ b/src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs
@@ -25,6 +25,7 @@ public class PassportImpl
private readonly PassportAnalytics _analytics = new();
private bool _pkceLoginOnly; // Used to differentiate between a login and connect
+ private DirectLoginMethod _directLoginMethod; // Store the direct login method for current operation
private UniTaskCompletionSource? _pkceCompletionSource;
private string _redirectUri;
private string _logoutRedirectUri;
@@ -97,7 +98,7 @@ public void SetCallTimeout(int ms)
_communicationsManager.SetCallTimeout(ms);
}
- public UniTask Login(bool useCachedSession = false)
+ public UniTask Login(bool useCachedSession = false, DirectLoginMethod directLoginMethod = DirectLoginMethod.None)
{
if (useCachedSession)
{
@@ -112,6 +113,7 @@ public UniTask Login(bool useCachedSession = false)
var task = new UniTaskCompletionSource();
_pkceCompletionSource = task;
_pkceLoginOnly = true;
+ _directLoginMethod = directLoginMethod;
#if UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN)
WindowsDeepLink.Initialise(_redirectUri, OnDeepLinkActivated);
#endif
@@ -161,7 +163,7 @@ private async UniTask Relogin()
return false;
}
- public async UniTask ConnectImx(bool useCachedSession = false)
+ public async UniTask ConnectImx(bool useCachedSession = false, DirectLoginMethod directLoginMethod = DirectLoginMethod.None)
{
if (useCachedSession)
{
@@ -187,6 +189,7 @@ public async UniTask ConnectImx(bool useCachedSession = false)
UniTaskCompletionSource task = new UniTaskCompletionSource();
_pkceCompletionSource = task;
_pkceLoginOnly = false;
+ _directLoginMethod = directLoginMethod;
#if UNITY_STANDALONE_WIN || (UNITY_ANDROID && UNITY_EDITOR_WIN) || (UNITY_IPHONE && UNITY_EDITOR_WIN)
WindowsDeepLink.Initialise(_redirectUri, OnDeepLinkActivated);
@@ -272,7 +275,8 @@ private async UniTask LaunchAuthUrl()
{
try
{
- string callResponse = await _communicationsManager.Call(PassportFunction.GET_PKCE_AUTH_URL);
+ var request = new GetPKCEAuthUrlRequest(!_pkceLoginOnly, _directLoginMethod);
+ string callResponse = await _communicationsManager.Call(PassportFunction.GET_PKCE_AUTH_URL, JsonUtility.ToJson(request));
StringResponse response = callResponse.OptDeserializeObject();
if (response != null && response.success == true && response.result != null)
diff --git a/src/Packages/Passport/Runtime/Scripts/Public/Passport.cs b/src/Packages/Passport/Runtime/Scripts/Public/Passport.cs
index 01f78cb28..adc560333 100644
--- a/src/Packages/Passport/Runtime/Scripts/Public/Passport.cs
+++ b/src/Packages/Passport/Runtime/Scripts/Public/Passport.cs
@@ -288,23 +288,25 @@ public void SetCallTimeout(int ms)
/// Logs into Passport using Authorisation Code Flow with Proof Key for Code Exchange (PKCE).
/// This opens the user's default browser on desktop or an in-app browser on mobile.
/// If true, Passport will attempt to re-authenticate the player using stored credentials. If re-authentication fails, it won't automatically prompt the user to log in again.
+ /// Optional direct login method to use (google, apple, facebook). If None, the user will see the standard login page.
///
///
/// Returns true if login is successful, otherwise false.
///
- public async UniTask Login(bool useCachedSession = false)
+ public async UniTask Login(bool useCachedSession = false, DirectLoginMethod directLoginMethod = DirectLoginMethod.None)
{
- return await GetPassportImpl().Login(useCachedSession);
+ return await GetPassportImpl().Login(useCachedSession, directLoginMethod);
}
///
/// Logs the user into Passport using Authorisation Code Flow with Proof Key for Code Exchange (PKCE) and sets up the Immutable X provider.
/// This opens the user's default browser on desktop or an in-app browser on mobile.
/// If true, Passport will attempt to re-authenticate the player using stored credentials. If re-authentication fails, it won't automatically prompt the user to log in again.
+ /// Optional direct login method to use (google, apple, facebook). If None, the user will see the standard login page.
///
- public async UniTask ConnectImx(bool useCachedSession = false)
+ public async UniTask ConnectImx(bool useCachedSession = false, DirectLoginMethod directLoginMethod = DirectLoginMethod.None)
{
- return await GetPassportImpl().ConnectImx(useCachedSession);
+ return await GetPassportImpl().ConnectImx(useCachedSession, directLoginMethod);
}
///