Datatbase secretes have been depreciated
See original GitHub issueDatatbase secretes have been depreciated do you have a way of doing this using Firebase Admin sdk?
var auth = "ABCDE"; // your app secret
var firebaseClient = new FirebaseClient(
"<URL>",
new FirebaseOptions
{
AuthTokenAsyncFactory = () => Task.FromResult(auth)
});
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:10
Top Results From Across the Web
Database secrets are currently deprecated and use a ...
Database secrets are currently deprecated and use a legacy Firebase token generator. Update your source code with the Firebase Admin SDK.
Read more >[Solved]Database secrets are currently deprecated |Firebase ...
Solution to get the database and secretes from the Firebase ... js 8 deprecated firebase,crashlytics has been deprecated in favor of ...
Read more >Firebase Database Secrets on Google Apps Script
As Database secrets are easier to use, far from really deprecated and safe enough for most use cases, that's what we will use...
Read more >Using (deprecated) secret to access firebase realtime ...
I have a simple Firebase realtime database, just PUT/GET. It all works. But security is confusing to me.
Read more >Restore an AWS Secrets Manager secret - AWS Documentation
Secrets Manager considers a secret scheduled for deletion deprecated and you can no longer directly access it. After the recovery window has passed,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The sample code from wikes82 worked for me when I added the second scope:
As described here: https://firebase.google.com/docs/database/rest/auth
for anyone needing sample code to use service account file
var firebaseClient = new FirebaseClient(FirebaseUrl, new FirebaseOptions { AuthTokenAsyncFactory = () => GetAccessToken(), AsAccessToken = true });
GetAccessToken() is something like this :
private async Task<string> GetAccessToken()
{
var credential = GoogleCredential.FromFile(pathToJsonFile).CreateScoped(new string[] {
"https://www.googleapis.com/auth/firebase.database"
});
ITokenAccess c = credential as ITokenAccess;
return await c.GetAccessTokenForRequestAsync();
}