Repository navigation
G Suite
zehavibarak edited this page Feb 8, 2022
·
1 revision
BizDoc G-Suite integration can be configured to handle authentication, email delivery and email feedback.
To integrate G-Suite, first add the following to startup.cs:
services.AddBizDoc().
AddGSuite(options => {
o.ApplicationName = "your-app-name";
o.ClientSecrets = "client_secret.json";
// o.ApiKey = "...";
});
...
app.UseBizDoc().
UseGSuite();Create a project at Google API Console, enable Gmail API, create credentials.
Download credentials JSON file and place it in your project. Set the file properties Build Action to Content. Provide the ApplicationName and the file name to ClientSecrets above.
To use GMail for outgoing emails, add:
AddGSuite().
UseEmailer();To pull email reply, add the following:
UseGSuite().
UseGMailFeedback();To use OAuth authentication, add the following:
services.AddBizDoc().
AddGSuite(...).
AddAuthenticationRedirect();
...
app.UseBizDoc().
UseGSuite().
UseAuthenticationRedirect().
UseIdentityProvider();The
UseIdentityProvideris optional here, and can be replaced with other implementation of IIdentityManager.
Moding Ltd.