question

David James avatar image
David James asked

Server version of: "IsClientLoggedIn()"

Photon requires server's to authenticate with the cloud before starting a server.
With playfab, there is only:

PlayFabClientAPI.GetPhotonAuthenticationToken(newGetPhotonAuthenticationTokenRequest()

In order to call this, however, you must first login.. so with some guidance I came across LoginWithServerCustomIdRequest.. This is fine, only I can't use IsClientLoggedIn after the ServerLoginResult or I get a null exception error..any advice on this situation?

Authenticationmultiplayer
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David James avatar image David James commented ·

if (login.AuthenticationContext.IsClientLoggedIn())
instead of
if (login.Request.AuthenticationContext.IsClientLoggedIn())

seems to work without error.. only I can't use it with ServerLoginResult, which sends me back to using client login api to authenticate servers.. which feels extremely silly to me:

https://community.playfab.com/questions/63860/best-way-to-ensure-loginwithservercustomid-is-uniq.html

0 Likes 0 ·

1 Answer

·
JayZuo avatar image
JayZuo answered

I'm not a Photon expert, but GetPhotonAuthenticationToken API is designed for players to authenticate with Photon so that only authenticated players can join a lobby or create a session. For more details, see Photon quickstart - PlayFab.

If Photon does require servers to authenticate with the cloud, please refer to Photon's docs to implement it.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David James avatar image David James commented ·

Thanks- it turned out to be either user error or photon correcting a previous mistake forcing servers to authenticate otherwise returning an error.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ David James commented ·

Glad to know you've figured it out. If you have any other questions on PlayFab, please feel free to let me know.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]