Skip to content

noname9xndz/Firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase

Step 1 : Add Setting file for Firebase

{
  "FirebaseConfig": {
    "AppId": "",
    "ApiKey": "",
    "Server_Key": "",
    "ProjectId": "",
    "UseLamdbaFunction": false,
    "UrlVerifyPhoneNumberLambda": "",
    "UseSlackNotify": false,
    "PushNotificationUrl": "https://fcm.googleapis.com/fcm/send",
    "GetAccountInfoUrl": "https://identitytoolkit.googleapis.com/v1/accounts:lookup?key=",
    "VerifyPhoneNumberUrl": "https://identitytoolkit.googleapis.com/v1/accounts:lookup?key=",
    "SessionInfoUrl": "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPhoneNumber?key="
  }
 
}

If you use Slack Noify Add

{
  "SlackConfig": {
    "ChannelSentryUrl": "",
    "ChannelUserRegUrl": "",
    "ChannelEditorUrl": "",
    "ChannelUserPaymentUrl": ""
  }
}

If you use lamdba function , you need add UrlVerifyPhoneNumberLambda and active UseLamdbaFunction and deploy function Firebase.AWS.Verify to AWS Lamdba Function

Step 2 : register

public void ConfigureServices(IServiceCollection services)
{
       
       services.Configure<SlackOptions>(options =>configuration.GetSection("SlackConfig").Bind(options));
       services.AddScoped<ISlackClient, SlackClient>();
       services.AddScoped<ISlackNotify, SlackNotify>();

       services.Configure<FirebaseConfig>(options => configuration.GetSection("FirebaseConfig").Bind(options));
       services.AddScoped<IFirebase, Firebase>();
}

  • Or
public void ConfigureServices(IServiceCollection services)
{
       
       FirebaseIoc.Register(services,Configuration)
}

  • Use :
public class TestController : Controller
{
     private readonly IFirebase _firebase;
     public TestController(IFirebase firebase)
     {
         _firebase = firebase
     }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published