5
私はasp.net 4.5のテンプレートで、Google以外のすべての認証サンプルを秘密とclientidで渡します。私はどのように私のGoogle秘密とclientidを渡すことができますか?asp.net 4.5を使用するOAuthでclientidとシークレットを登録する
をそのテンプレートが付属して、次のようにサンプルコードがある:Brockさんは、私は、次のよここで良い議論を持っています。
internal static class AuthConfig
{
public static void RegisterOpenAuth()
{
// See http://go.microsoft.com/fwlink/?LinkId=252803 for details on setting up this ASP.NET
// application to support logging in via external services.
//OpenAuth.AuthenticationClients.AddTwitter(
// consumerKey: "your Twitter consumer key",
// consumerSecret: "your Twitter consumer secret");
//OpenAuth.AuthenticationClients.AddFacebook(
// appId: "your Facebook app id",
// appSecret: "your Facebook app secret");
//OpenAuth.AuthenticationClients.AddMicrosoft(
// clientId: "your Microsoft account client id",
// clientSecret: "your Microsoft account client secret");
// OpenAuth.AuthenticationClients.AddGoogle();
}
}
なぜあなたはアプリのIDと秘密を渡したいのですか?これにより、ユーザーは認証され、データなしでデータを取得できます。 –
こんにちはジェイド、私はトークンを格納し、認証に使用するクライアントアプリケーションにトークンを渡すことができるように、私はappIdと秘密が必要です。 –
また、GoogleでIMAPクライアントを認証するにはトークンが必要です。それがここでOAuthを使用する主な目的です。 –