Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question it possible to distinguish what authentication was made from?

Discussion in 'Authentication' started by youngwoocho02, Sep 3, 2023.

  1. youngwoocho02

    youngwoocho02

    Joined:
    Feb 8, 2019
    Posts:
    16
    When connecting with other services (relay, lobby, etc.) in the future, is it possible to distinguish what authentication was made from?

    For example, excluding anonymous login users.
     
  2. RapidTurtleGames

    RapidTurtleGames

    Joined:
    Feb 14, 2015
    Posts:
    4
    I would like to know this too...

    Anyway, is there a way to know is the player signed-in anonymously? I can't find any info about this?!?
     
  3. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    279
    Hi there,
    It would be possible using the player info

    If the user is anonymous users the identities count would be 0. If the user is linked to Facebook / Apple or other the count would be greater than 1.

    upload_2023-11-23_16-46-21.png

    Hope this helps.
     
    RapidTurtleGames likes this.
  4. youngwoocho02

    youngwoocho02

    Joined:
    Feb 8, 2019
    Posts:
    16

    Thanks it is usable right now? Or do I have to do update?
     
  5. DVelt

    DVelt

    Joined:
    Feb 11, 2023
    Posts:
    20
    I'm having the same issue and attempted to deploy your fix. I can't however seem to get it to work when the authentication option is set to Username and Password. The identities count just stays at 0, leading to the guest expression always returning true. Bug maybe?
     
  6. RapidTurtleGames

    RapidTurtleGames

    Joined:
    Feb 14, 2015
    Posts:
    4
    I check for the PlayerInfo.Username and PlayerInfo.LastPasswordUpdate. They shouldn't be null if the user signed in with username/password.
     
  7. DVelt

    DVelt

    Joined:
    Feb 11, 2023
    Posts:
    20
    Yeah I figured that out after checking all the available methods, and I completely forgot about this post. But thanks anyway!