last day (14 days later) » 

9:14 AM
Hello
 
9:56 AM
Hi. Did you manage to find out what's wrong?
 
10:19 AM
Hi
i need to lookinto his code how he is doing
what about you guys
any luck?
 
10:38 AM
Hello
You guys got what i am trying to achieve ??
What i have done just created Default Web Form Application Not MVC 4 or 5 . Uncommented the code from AuthConfig.cs file which will enable the button for google , Facebook , Twitter for Authentication on login screen, I got Facebook working properly i gave the required 2 keys and its done. But for Google i didnt found any parameter which will pass and its done so i want help for the Google authentication Thank You
 
Ok
I created the web form
Same as you mention
now on clicking the Google
what is url you are redirecting?
so : For Google Url Redirect this
var Googleurl = "https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=" + ConfigurationManager.AppSettings["googleplus_redirect_url"] + "&scope=googleapis.com/auth/userinfo.email%20https://www.googleapis.com/…; + ConfigurationManager.AppSettings["googleplus_client_id"];
redirect url will be after autenticating where the values need to be displayed in your application
and client id is the one which you registered in googler developer
Now
do this
Response.Redirect(Googleurl);
 
10:58 AM
Have you tried this Liquid?
 
plz check liquid i tried and worked for me
if you did i can give you return url code how i handled it
first you need to send to google ..
are you able to succed in doing it ?
 
11:41 AM
I am not getting redirected any where. OnClick its crashing with the exception

An exception of type 'DotNetOpenAuth.Messaging.ProtocolException'
occurred in DotNetOpenAuth.OpenId.RelyingParty.dll but was not handled in user code

Additional information: No OpenID endpoint found.
For your information i am using vs 2015
 
you said that you are using web forms right
 
yes
 
yes i did my example of the same
 
and its crashing on this control OpenAuthProviders.ascx.cs
 
wait a sec
ascx is usercontrol
 
11:44 AM
protected void Page_Load(object sender, EventArgs e)
{

if (IsPostBack)
{
var provider = Request.Form["provider"];
if (provider == null)
{
return;
}

var redirectUrl = "~/Account/RegisterExternalLogin";
if (!String.IsNullOrEmpty(ReturnUrl))
{
var resolvedReturnUrl = ResolveUrl(ReturnUrl);
redirectUrl += "?ReturnUrl=" + HttpUtility.UrlEncode(resolvedReturnUrl);
}

OpenAuth.RequestAuthentication(provider, redirectUrl);
}
}

on last line
 
ok
i wil explain your code
see
you need to send to google for autentication so where you are doing that?
i am ask where is that redirect url
here i am seeing the return url from Google
after sucessful completion of autentication
 
var redirectUrl = "~/Account/RegisterExternalLogin";
 
hmm ..seee
we need to tak with the google
so their url is this
var Googleurl = "https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=" + ConfigurationManager.AppSettings["googleplus_redirect_url"] + "&scope=googleapis.com/auth/…; + ConfigurationManager.AppSettings["googleplus_client_id"];
in this
redirect url where you want to land after returning from google
an client id is the one you created in google developer
after that
you need to do
Response.Redirect(Googleurl );
then it will talk with the google api
if you configured everything correct
after autenticating it will redirect to Redirect url which you configured in the Google api site
 
can i get the code want to see what you have done exactly. and what i missed
 
hmmm
ok give me a sec
this code is present on the login page,
and i have kept a google plus image icon
on click event
i am calling this method
protected void lnkbtngplus_Click(object sender, EventArgs e)
{
try
{
var Googleurl = "https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=" + ConfigurationManager.AppSettings["googleplus_redirect_url"] + "&scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile&client_id=" + ConfigurationManager.AppSettings["googleplus_client_id"];
Session["loginWith"] = "google";
Response.Redirect(Googleurl);
}

catch (Exception ex)
{
Master.Messages(ex.Message);
so are we clear till this step
???
 
11:51 AM
yes
one question hee
here
 
ok
plz
 
googleplus_redirect_url from web.config ?? what is the value
 
yes
or else for time being you hard core the value
for testing if it works
its ur wish
 
ok
 
you can use web config
or from db
best practise will be
web config
 
11:53 AM
yes . ok
 
check that you are redirecting to google
so can you try till that part and
for autentication
for reference i added the autenticating screen which i tried
ping me your result
i am in office will check it
 
 
3 hours later…
2:40 PM
did u checked?
my solution?
 

last day (14 days later) »