Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
JWT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kis_intern1
JWT
Commits
51c824b8
Commit
51c824b8
authored
Aug 10, 2023
by
nk161690
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main scene
load into main scene upon successful signin
parent
80baba42
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
866 additions
and
21 deletions
+866
-21
UnityProject/Assets/AccountLogin.cs
UnityProject/Assets/AccountLogin.cs
+0
-2
UnityProject/Assets/FacebookLogin.cs
UnityProject/Assets/FacebookLogin.cs
+3
-0
UnityProject/Assets/Log.cs
UnityProject/Assets/Log.cs
+0
-1
UnityProject/Assets/PhotonServer.cs
UnityProject/Assets/PhotonServer.cs
+1
-1
UnityProject/Assets/Scenes/Login.unity
UnityProject/Assets/Scenes/Login.unity
+0
-14
UnityProject/Assets/Scenes/Main.unity
UnityProject/Assets/Scenes/Main.unity
+857
-0
UnityProject/Assets/UserSessionManager.cs
UnityProject/Assets/UserSessionManager.cs
+2
-3
UnityProject/ProjectSettings/EditorBuildSettings.asset
UnityProject/ProjectSettings/EditorBuildSettings.asset
+3
-0
No files found.
UnityProject/Assets/AccountLogin.cs
View file @
51c824b8
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
Photon.Pun
;
using
Photon.Pun
;
using
Photon.Realtime
;
using
Photon.Realtime
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Net.Http
;
using
System.Net.Http
;
using
TMPro
;
using
TMPro
;
using
UnityEngine
;
using
UnityEngine
;
...
...
UnityProject/Assets/FacebookLogin.cs
View file @
51c824b8
...
@@ -3,6 +3,7 @@ using Photon.Pun;
...
@@ -3,6 +3,7 @@ using Photon.Pun;
using
Photon.Realtime
;
using
Photon.Realtime
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.SceneManagement
;
public
class
FacebookLogin
:
MonoBehaviour
public
class
FacebookLogin
:
MonoBehaviour
{
{
...
@@ -61,6 +62,8 @@ public class FacebookLogin : MonoBehaviour
...
@@ -61,6 +62,8 @@ public class FacebookLogin : MonoBehaviour
string
accessToken
=
AccessToken
.
CurrentAccessToken
.
TokenString
;
string
accessToken
=
AccessToken
.
CurrentAccessToken
.
TokenString
;
Debug
.
Log
(
"Facebook Login Successful! Access Token: "
+
accessToken
);
Debug
.
Log
(
"Facebook Login Successful! Access Token: "
+
accessToken
);
SceneManager
.
LoadScene
(
"Main"
);
// Continue with Photon authentication
// Continue with Photon authentication
OnFacebookLoggedIn
();
OnFacebookLoggedIn
();
...
...
UnityProject/Assets/Log.cs
View file @
51c824b8
...
@@ -4,7 +4,6 @@ using System.Net.Http.Headers;
...
@@ -4,7 +4,6 @@ using System.Net.Http.Headers;
using
System.Net.Http
;
using
System.Net.Http
;
using
System.Text
;
using
System.Text
;
using
UnityEngine
;
using
UnityEngine
;
using
static
System
.
Collections
.
Specialized
.
BitVector32
;
public
static
class
Log
public
static
class
Log
{
{
...
...
UnityProject/Assets/PhotonServer.cs
View file @
51c824b8
...
@@ -11,7 +11,7 @@ public class PhotonServer : MonoBehaviourPunCallbacks
...
@@ -11,7 +11,7 @@ public class PhotonServer : MonoBehaviourPunCallbacks
{
{
base
.
OnConnectedToMaster
();
base
.
OnConnectedToMaster
();
Debug
.
Log
(
"Connected to Photon!"
);
Debug
.
Log
(
"Connected to Photon!"
);
message
.
text
=
"Login successful!
Connected to Photon."
;
message
.
text
=
"Login successful!
<br>
Connected to Photon."
;
}
}
public
override
void
OnDisconnected
(
DisconnectCause
cause
)
public
override
void
OnDisconnected
(
DisconnectCause
cause
)
...
...
UnityProject/Assets/Scenes/Login.unity
View file @
51c824b8
...
@@ -503,7 +503,6 @@ GameObject:
...
@@ -503,7 +503,6 @@ GameObject:
-
component
:
{
fileID
:
519420032
}
-
component
:
{
fileID
:
519420032
}
-
component
:
{
fileID
:
519420031
}
-
component
:
{
fileID
:
519420031
}
-
component
:
{
fileID
:
519420029
}
-
component
:
{
fileID
:
519420029
}
-
component
:
{
fileID
:
519420033
}
m_Layer
:
0
m_Layer
:
0
m_Name
:
Main Camera
m_Name
:
Main Camera
m_TagString
:
MainCamera
m_TagString
:
MainCamera
...
@@ -585,19 +584,6 @@ Transform:
...
@@ -585,19 +584,6 @@ Transform:
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_Father
:
{
fileID
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!114
&519420033
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
519420028
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
873ca38bdc936c944a2ffa4cb281ce7c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
message
:
{
fileID
:
0
}
---
!u!1
&727956155
---
!u!1
&727956155
GameObject
:
GameObject
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
UnityProject/Assets/Scenes/Main.unity
View file @
51c824b8
This diff is collapsed.
Click to expand it.
UnityProject/Assets/UserSessionManager.cs
View file @
51c824b8
using
Photon.Pun
;
using
Photon.Pun
;
using
System
;
using
System
;
using
TMPro
;
using
UnityEngine
;
using
UnityEngine
;
using
UnityEngine.SceneManagement
;
using
static
Log
;
using
static
Log
;
public
class
UserSessionManager
:
MonoBehaviour
public
class
UserSessionManager
:
MonoBehaviour
...
@@ -22,12 +22,11 @@ public class UserSessionManager : MonoBehaviour
...
@@ -22,12 +22,11 @@ public class UserSessionManager : MonoBehaviour
{
{
if
(
currentSession
!=
null
)
if
(
currentSession
!=
null
)
{
{
// Set the logout time for the current session
currentSession
.
LogoutTime
=
DateTime
.
Now
.
ToString
(
"dd/MM/yyyy HH:mm"
);
currentSession
.
LogoutTime
=
DateTime
.
Now
.
ToString
(
"dd/MM/yyyy HH:mm"
);
LogLoginSession
(
currentSession
);
LogLoginSession
(
currentSession
);
// Reset the current session
currentSession
=
null
;
currentSession
=
null
;
PhotonNetwork
.
Disconnect
();
PhotonNetwork
.
Disconnect
();
SceneManager
.
LoadScene
(
"Login"
);
}
}
}
}
}
}
UnityProject/ProjectSettings/EditorBuildSettings.asset
View file @
51c824b8
...
@@ -8,4 +8,7 @@ EditorBuildSettings:
...
@@ -8,4 +8,7 @@ EditorBuildSettings:
-
enabled
:
1
-
enabled
:
1
path
:
Assets/Scenes/Login.unity
path
:
Assets/Scenes/Login.unity
guid
:
2cda990e2423bbf4892e6590ba056729
guid
:
2cda990e2423bbf4892e6590ba056729
-
enabled
:
1
path
:
Assets/Scenes/Main.unity
guid
:
2cc858c23c576ec44837e5ff1889e937
m_configObjects
:
{}
m_configObjects
:
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment