Stay organized with collections Save and categorize content based on your preferences.
You can integrate Firebase Authentication with a custom authentication system bymodifying your authentication server to produce custom signed tokens when a usersuccessfully signs in. Your app receives this token and uses it to authenticatewith Firebase.
Call Firebase.Auth.FirebaseAuth.SignInWithCustomTokenAsync with the token fromyour authentication server.
When users sign in to your app, send their sign-in credentials (forexample, their username and password) to your authentication server. Yourserver checks the credentials and returns acustom tokenif they are valid.
After you receive the custom token from your authentication server, passit to Firebase.Auth.FirebaseAuth.SignInWithCustomTokenAsync to sign in theuser:
After a user signs in for the first time, a new user account is created andlinked to the credentials—that is, the user name and password, phonenumber, or auth provider information—the user signed in with. This newaccount is stored as part of your Firebase project, and can be used to identifya user across every app in your project, regardless of how the user signs in.
In your apps, you can get the user's basic profile information from theFirebase.Auth.FirebaseUser object:
Firebase.Auth.FirebaseUser user = auth.CurrentUser;if (user != null) { string name = user.DisplayName; string email = user.Email; System.Uri photo_url = user.PhotoUrl; // The user's Id, unique to the Firebase project. // Do NOT use this value to authenticate with your backend server, if you // have one; use User.TokenAsync() instead. string uid = user.UserId;}
In your Firebase Realtime Database and Cloud StorageSecurity Rules, you can get the signed-in user's unique user ID from the auth variable, and use it to control what data a user can access.
Before you can use Firebase Authentication, you need to:
Register your Unity project and configure it to use Firebase. If your Unity project already uses Firebase, then it's already registered and configured for Firebase. ...
Add the Firebase Unity SDK (specifically, FirebaseAuth. unitypackage ) to your Unity project.
You can use Firebase Authentication to allow users to sign in to your app using one or more sign-in methods, including email address and password sign-in, and federated identity providers such as Google Sign-in and Facebook Login.
In the Unity Editor menu, go to Edit > Project Settings…, then select Services > Authentication.Set ID Providers to Username/Password, then select Add.Select Save.
In the Firebase console, open the Authentication section. On the Sign in method tab, enable the Email/Password provider. Note that email/password sign-in must be enabled to use email link sign-in. In the same section, enable Email link (passwordless sign-in) sign-in method and click Save.
When users sign in to your app, send their sign-in credentials (for example, their username and password) to your authentication server. Your server checks the credentials and, if they are valid, creates a custom Firebase token and sends the token back to your app.
Install the Firebase CLI tool npm install -g firebase-tools . Login into Firebase from the CLI firebase login . Run firebase init functions then select an existing project (that you created above). Select language as JavaScript for this example.
Increase engagement and provide consistent experiences by adding a player identity system to your game. It's built to integrate seamlessly with Unity projects and is free to use.
Navigate to System > Security - Sign-on Settings. In the Authentication Server URL field, enter https:// followed by the host name configured during the Authentication Server installation.
Introduction: My name is Francesca Jacobs Ret, I am a innocent, super, beautiful, charming, lucky, gentle, clever person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.