what happens when i give my google account client id to anet core 6 developer?

I thing the problem is inside this 2 lines:

   options.ClientId = builder.Configuration["591241482908-66qgk38nbf1un6mxxxxxxxxxx.apps.googleusercontent.com"];
options.ClientSecret = builder.Configuration["GOCSPX-jHKaxxxxxxx"];

You should pass there the key from your settings, not the value.

Try to pass values directly for now:

   options.ClientId = "591241482908 66qgk38nbf1un6mxxxxxxxxxx.apps.googleusercontent.com";
   options.ClientSecret = "GOCSPX-jHKaxxxxxxx";

And if it helps put in your configuration keys and values, like this:

"clientId":"591241482908 66qgk38nbf1un6mxxxxxxxxxx.apps.googleusercontent.com",
"clientSecret":"GOCSPX-jHKaxxxxxxx"

And rewrite your code to:

options.ClientId = builder.Configuration["clientId"];
options.ClientSecret = builder.Configuration["clientSecret"];

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top