#How would I link an existing Clerk user account to a new UGS player ID?

1 messages · Page 1 of 1 (latest)

cursive crypt
#

Recently, Clerk auth now allows developers to host OpenID Connect to Clerk.
I have already set up Clerk and its Oauth, with the application credentials.
Clerk is already linked to UGS identity provider list in my project.

How would I make it so that existing Clerk accounts can log in to my Unity app that has UGS?

I plan on using Clerk for player authentication for more control and it has support for OpenID Connect, meaning that I can have players to login to Unity apps that are on different UGS projects, and across different future web apps.

But I am having trouble because, UGS web API does not seem to support OpenID Connect Accounts, and there isn't anything in the documentation to link an existing Open ID Connect account to a new UGS player ID or an existing OpenID Connect account to an already existing UGS player ID.

#

There doesn't seem to be a UGS web api to create a new account through OpenID Connect.

rich lotus
#

You would need the OIDC name and Issuer URL to set up OpenID Connect

You have to pass the provider name and id token to SignInWithOpenIdConnectAsync()

cursive crypt
rich lotus
#

the provider is the oidc provider name. it should start with oidc-

cursive crypt
#

sorry, I figured out that idProvider should be the issuer url.

cursive crypt
rich lotus
#

good to know

cursive crypt
# rich lotus good to know

sorry, you were right.

it actually was oidc-
I'm just trying out different values, because the documentation doesn't really tell me what to do with Clerk OpenID Connect.

I am a bit stuck on what values to use for it to work

rich lotus
cursive crypt
#

what would invalid audience mean?

cursive crypt
#

Update. I think I got it to work.

It took 4 hours total to figure this out.

The specific token its looking for is a Clerk Id token that was signed in using the Clerk OAuth with a scope of openid.

#

Btw. I think it would be really good if Unity integrated more closely with Clerk Auth and its OpenID Connect.

Clerk Auth is very new and was released less than a year ago, but I think the features Clerk has would be really good with UGS. Going to test it out further.