Unity Player Accounts : Multi-Platform Auth Login (Google, Apple, Email & More!) in 9 Easy Minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 83

  • @hansfritz6026
    @hansfritz6026 11 หลายเดือนก่อน +8

    nevermind i found the issue the code is not the problem during that setup phase in the unit dashboard i only selected ios/android but not PC. but if you dont select PC then testing on PC in the editor doesnt work. please continue this series its really helpful :-)

    • @navarone77
      @navarone77  10 หลายเดือนก่อน

      Interesting find
      Good to know this for future, glad you got it all sorted!
      Happy Coding :)

    • @RELIM_RO
      @RELIM_RO 9 หลายเดือนก่อน

      Thank you brother, was about to post something about it. then I read your comment and face palmed myself so hard XD.

  • @SelaMalka
    @SelaMalka 8 หลายเดือนก่อน +3

    Thank you very much! great tutorial!
    One question though - can you think of a way to keep the player logged in even after he quit the application?

    • @navarone77
      @navarone77  8 หลายเดือนก่อน +1

      Do you mean on the mobile device ?

  • @lucasalmeida240
    @lucasalmeida240 2 หลายเดือนก่อน +1

    Excellent video, could you make one using Play Games as a Provider? I saw that there are several options besides this one, but I couldn't adjust the code to use with Play Games... Thanks!

  • @12Kefu
    @12Kefu 6 หลายเดือนก่อน +2

    hey the code is great but you have to login every time you launch the app can you help me with the issue

    • @navarone77
      @navarone77  6 หลายเดือนก่อน

      You can make a system easily, after you login , you can use the method for detecting already cached player, using the method below
      docs.unity.com/ugs/en-us/manual/authentication/manual/cached-players

  • @hansfritz6026
    @hansfritz6026 11 หลายเดือนก่อน +2

    unfortunatly im getting "error_description=The+request+is+missing+a+required+parameter+or+is+using+an+unsupported+parameter."

    • @navarone77
      @navarone77  7 หลายเดือนก่อน

      Hi sorry for late reply, are you still having this issue? I wouldn't mind taking a look into it again, you'd have to provide me more detail on what going on or where is exactly that error appears.
      thanks!

  • @ROCKSMASHER
    @ROCKSMASHER 2 หลายเดือนก่อน

    Can you please tell how can we make that it will be saved in user like instead of signing in everytime it should be remember me and logout buttons

  • @makuachigaming431
    @makuachigaming431 17 วันที่ผ่านมา

    Master! thanks to your video save my life how about the logout button which can be signout even credentials like session destroy and to able login another account and even the name can be modified/edit. can you make a video? ❤

  • @hardworkerstudio
    @hardworkerstudio 8 หลายเดือนก่อน +1

    it really difficult to follow your typing,
    some class are missing some class are don't know what namespace you used,
    you should add all script to description,
    so, people can easily copy them

    • @navarone77
      @navarone77  8 หลายเดือนก่อน

      Sorry you had troubles, not sure classes were missing.
      Okay I will add all the scripts to description

  • @devonn6_
    @devonn6_ 9 หลายเดือนก่อน +1

    It works fine on editor but on phone the app restarts again and goes to he login page...Any solutions

    • @navarone77
      @navarone77  9 หลายเดือนก่อน

      I tested on phone as you see in video and seems to work , would you mind sharing more info on your setup ?

    • @devonn6_
      @devonn6_ 9 หลายเดือนก่อน

      @@navarone77 yes..but let me try one more time...

    • @devonn6_
      @devonn6_ 9 หลายเดือนก่อน

      @@navarone77 one think I want to say that when I click on login it will open a browser and try to login..but when it goes back after login from the browser ...the game will restart ..its seems its not running on background. .any solution ?

    • @navarone77
      @navarone77  9 หลายเดือนก่อน

      @@devonn6_ hmm that is strange, something might be wrong with your code I'm thinking. Just tested everything again and seems to work here. Perhaps try it on a brand new project just to test out?

    • @devonn6_
      @devonn6_ 9 หลายเดือนก่อน

      @@navarone77 we need to write code for making our app run on recent background apps?..

  • @fastsolution
    @fastsolution 8 หลายเดือนก่อน

    did they removed the "unity player accounts" i cant see it in the services ?

    • @navarone77
      @navarone77  8 หลายเดือนก่อน

      Did you install the Authentication package ?
      Just tested it on Unity 2023 as well, it is still there in Project Settings after you install Authentication.

    • @fastsolution
      @fastsolution 8 หลายเดือนก่อน

      @@navarone77 yes i did but player accounts is not showing in services it shows online in the providers.. could it be the unity version issue ? i am using 2022.1.24f1

    • @fastsolution
      @fastsolution 8 หลายเดือนก่อน

      it shows all the other providers like facebook,google,steam etc..
      @@navarone77

    • @Nounsi_Dev
      @Nounsi_Dev 8 หลายเดือนก่อน

      @@fastsolution restart the editor, atleast that how i sovle the issue

    • @MarwanSharaiha
      @MarwanSharaiha 7 หลายเดือนก่อน

      @@Nounsi_Dev it can only be selected in Unity Cloud and then it reflects automatically in the Authentication tab.

  • @javiergarcialopez8365
    @javiergarcialopez8365 11 หลายเดือนก่อน +3

    Nice tutorial bro !! Thanks so much !!!

    • @navarone77
      @navarone77  11 หลายเดือนก่อน

      you're welcome :)
      thanks for watching!

  • @goncalobarros4124
    @goncalobarros4124 2 หลายเดือนก่อน

    I did this and it is working. Now, all of the sudden the login when redirects me to unity log in on the browser gives "OOPPS Something is wrong!try to signing in again" Do you know what is happening?

  • @xpi8857
    @xpi8857 9 หลายเดือนก่อน +1

    I tried and couldn't get the avatar. Is there any way to get the avatar?

    • @navarone77
      @navarone77  9 หลายเดือนก่อน

      Very interesting question, this might be an upcoming feature unity is implementing, I will look into a way to get this done beforehand though.
      thanks!

  • @weiruowei4576
    @weiruowei4576 4 หลายเดือนก่อน +1

    your login is helpful, but I am not sure how it log out here?

    • @navarone77
      @navarone77  4 หลายเดือนก่อน +1

      Hi Thanks for watching! to Sign out you can call
      AuthenticationService.Instance.SignOut
      you can pass a bool in the method to clear credentials / stored session.
      Link to Docs:
      docs.unity.com/ugs/en-us/packages/com.unity.services.authentication/2.6/api/Unity.Services.Authentication.IAuthenticationService#Unity_Services_Authentication_IAuthenticationService_SignOut_System_Boolean_
      You might also need to call
      PlayerAccountService.Instance.SignOut();
      Beforehand
      Hope it helps :)

    • @weiruowei4576
      @weiruowei4576 4 หลายเดือนก่อน

      @@navarone77 thank you very much for your response, but I have problem when using onclick event. It won't give appropriate drop down menu every time ,so my button is not triggered

    • @navarone77
      @navarone77  4 หลายเดือนก่อน

      @@weiruowei4576 wdym by "the appropriate dropdown"
      are you talking about the onclick event?have you dragged in the OnClick event the component/script that is on the gameobject ? make sure its not the one from the Project View

  • @hansfritz6026
    @hansfritz6026 10 หลายเดือนก่อน +2

    would you mind including this in your next video ? ugs/manual/authentication/manual/best-practices this includes first time user experience which i am struggling right now. i want a anonymous login in the background and a check for cached user and then later offer the player a UI popup with the offer of linking with an actual google or apple account

    • @navarone77
      @navarone77  10 หลายเดือนก่อน +1

      Prefect timing! I am actually working on a series on this Unity system, that also includes doing Player Profiles, chat features and also game avatars ofc :)
      I'll be sure to drop the video with your suggestions first, thanks for reminder! if you haven't already, don't forget to subscribe and stay tuned

    • @lawrence_g3
      @lawrence_g3 2 หลายเดือนก่อน

      @@navarone77 hey I love your tutorials and I am really looking forward to this specific topic. Please keep us updated. I have liked and subscribed with notifications on!

  • @frostypixelsgames9350
    @frostypixelsgames9350 10 หลายเดือนก่อน +1

    how do you log out ? of the account, it alays logs tothe same account on google

    • @navarone77
      @navarone77  10 หลายเดือนก่อน +1

      good question, I will look into this again tomorrow for sure and will get back at you with an answer.
      Did you try the AuthenticationService class Logout method already?
      iirc that should delete any previous tokens, will verify how it is on browser thought to be sure.

    • @frostypixelsgames9350
      @frostypixelsgames9350 10 หลายเดือนก่อน

      yes, i found out the solution it works , but the browser keeps remembering the auth@@navarone77

    • @aize7887
      @aize7887 5 หลายเดือนก่อน

      @@navarone77 I tried AuthenticationService.Instance.SignOut(true); but seem the player haven't acutally signed out
      "PlayerAccountsException: Player is already signed in. Unity.Services.Authentication.PlayerAccounts.PlayerAccountServiceInternal.StartSignInAsync (System.Boolean isSigningUp) (at ./Library/PackageCache/com.unity.services.authentication@3.3.1/Player Accounts/Runtime/PlayerAccountServiceInternal.cs:60)"

    • @aize7887
      @aize7887 5 หลายเดือนก่อน

      @@navarone77 Could you help us fix this, please?

    • @navarone77
      @navarone77  5 หลายเดือนก่อน

      @@aize7887 hey did you check my previous reply ? There should be a logout method on the AuthenticationService

  • @NASA-Educational
    @NASA-Educational 6 หลายเดือนก่อน

    so only the unity team can see if someone login to your app? like user's name,email and id?

    • @navarone77
      @navarone77  6 หลายเดือนก่อน

      I'm not entirely sure how they handle the data in UGS, look into their PrivacyPolicy/TOS.
      Likely they only have access to the same public info you do, nothing private.

  • @hansfritz6026
    @hansfritz6026 11 หลายเดือนก่อน

    i rewatched everything still dont see what i missed is there maybe something set in LoginBtn for events that you didnt show ?

    • @navarone77
      @navarone77  9 หลายเดือนก่อน

      Hey could you provide more details on how and when you get error message ? I'm trying to look into it

  • @zarplay.official
    @zarplay.official 6 หลายเดือนก่อน +1

    Is it possible to block players through this system?

    • @navarone77
      @navarone77  6 หลายเดือนก่อน

      You can disable an account with Player Management system.

    • @zarplay.official
      @zarplay.official 6 หลายเดือนก่อน

      ​@@navarone77how?

    • @zarplay.official
      @zarplay.official 6 หลายเดือนก่อน

      ​@@navarone77hooow?

    • @zarplay.official
      @zarplay.official 6 หลายเดือนก่อน

      You delete comment?

    • @navarone77
      @navarone77  6 หลายเดือนก่อน

      @@zarplay.official No I don't think so. It still shows fro me. I said you can disable accounts inside the Player Management system

  • @indievisualgames345
    @indievisualgames345 9 หลายเดือนก่อน

    Hi nice tutorial, Is there any way to have multi login methods for Google Apple and custom login, also in that case how the auto login will check in terms of scripting, eg a user has apple login, if google play login fails in auth then how it will come to apple login and check via scripting. on the login screen we have 3 ways to login that is google apple & custom email login

    • @navarone77
      @navarone77  9 หลายเดือนก่อน

      Do you mean separately ?
      Google play by the way is a separate auth , this one is the Unity Player Login should cover all those mentioned already in vid. The Player Login method only waits for the token once logged in.
      Would you mind explaining the use case of what you're doing this for?

  • @hardworkerstudio
    @hardworkerstudio 8 หลายเดือนก่อน +1

    I feel thank you for making this VDO a bit
    But!!!
    why do you add functions to Buttons by scripts?
    this is you are making a Tutorial VDO,
    and your typing is also very difficult to follow
    something should add first, But you add last, it so wiered
    and it not makesense at all!

    • @navarone77
      @navarone77  8 หลายเดือนก่อน +1

      Thank you for the feedback, I'll certainly make note of your suggestion about the order of elements in the video. Is there a specific part this occurs?
      I'll review and adjust accordingly for future content.
      Regarding the buttons,assigning them in code for better clarity. It's definitely helpful to have all references visible in the code editor for easier management and understanding what is linked to what without going through inspector or unity Editor every time. Thanks again for your insights!

  • @jacobjacob5735
    @jacobjacob5735 7 หลายเดือนก่อน +2

    Why did you not upload the code? At least write it in the description or as a comment. Without comment and then also sped up. Not really as helpfull as I had hoped...

    • @navarone77
      @navarone77  7 หลายเดือนก่อน

      It's pretty straight forward, but I can see how it can be useful to have source code. I will do so in the next videos.
      Appreciate the Feedback

    • @AsTrO-zq1kz
      @AsTrO-zq1kz 7 หลายเดือนก่อน +1

      ​@@navarone77bro pls reply. So,If we use this login system,this can save the in-game data for each account for example,the level of player or something they have collected?And once they logout and then login again ,may the data be saved for that account.?

    • @TheCollectiveYoutube
      @TheCollectiveYoutube 7 หลายเดือนก่อน +1

      ​@@AsTrO-zq1kz yes, but you use learn how to read and write to the database

    • @navarone77
      @navarone77  7 หลายเดือนก่อน +1

      @@AsTrO-zq1kz That is correct, this allows to store data for each one of those player accounts via Unity Cloud Save.
      I have an intro video on intro to Cloud Save , working on a series to do dashboard for players to manage their own data.
      Subscribe to stay tuned, should be dropping in a few weeks

    • @navarone77
      @navarone77  6 หลายเดือนก่อน +1

      Hey there, I've uploaded the code/project used in the video. Hope it helps
      github.com/navarone77/UnityPlayerLogin_Example

  • @NASA-Educational
    @NASA-Educational 6 หลายเดือนก่อน

    how to logout after login?

    • @navarone77
      @navarone77  6 หลายเดือนก่อน

      AuthenticationService.Instance.SignOut
      will sign out, you can pass a bool to clear credentials.
      Docs:
      docs.unity.com/ugs/en-us/packages/com.unity.services.authentication/2.6/api/Unity.Services.Authentication.IAuthenticationService#Unity_Services_Authentication_IAuthenticationService_SignOut_System_Boolean_

  • @lukeydzbecx8319
    @lukeydzbecx8319 11 หลายเดือนก่อน +2

    Bro thank u for this

    • @navarone77
      @navarone77  11 หลายเดือนก่อน

      you're welcome!

  • @megamusic7656
    @megamusic7656 29 วันที่ผ่านมา

    apple?

    • @navarone77
      @navarone77  20 วันที่ผ่านมา

      should work with apple yes, I cannot currently test it without having a apple dev account

  • @juancarlosiglesiasburgueno5296
    @juancarlosiglesiasburgueno5296 8 หลายเดือนก่อน

    And how to register? Or it is in? Sorry for my atrevement but first is register. Please tell me. Thanks.

    • @navarone77
      @navarone77  7 หลายเดือนก่อน

      The account is already a registered account by using the other providers, you can also sign up with email and password. It takes care of registration for you