nguyentientoan / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

not able to login on facebook,gmail,yahoo on local system environment #125

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
please give a proper solution for local environment.

Original issue reported on code.google.com by anuj.sharma@deft.in on 5 Nov 2012 at 9:18

GoogleCodeExporter commented 8 years ago
I'm not very clear about your query. However, if you're referring to "How to 
use providers with http://localhost", that is not recommended as not all 
providers support localhost. If you're referring to how to setup demo, please 
check video on wiki home.

If you're referring to something else, please provide details to help us help 
you out.

Deepak

Original comment by deepakag...@gmail.com on 6 Nov 2012 at 5:52

GoogleCodeExporter commented 8 years ago
Thank you deepak for your valuable response ,the problem is that when i am 
clicking facebook after registering application on IIS I got login window and 
after login when application give response to my aplication it shows HTTP 404 
error. but the session for facebook is created at this moment so I am not able 
to resolve this issue .
please reply soon.

Thank you

Anuj Sharma

Original comment by anuj.sharma@deft.in on 6 Nov 2012 at 6:40

GoogleCodeExporter commented 8 years ago
What URL is appearing in browser when you see 404 Not Found? If it ends with 
.sauth, it means your application is not configured to work with httpHandlers. 
Please ensure your application pool (used for the site in context) is running 
in integrated mode with 4.0 framework. If the URL is different than aforesaid, 
please reply with that URL.
You can also try to create a simple hello world kind httphandler to ensure 
httphandlers are being supported.

Deepak

Original comment by deepakag...@gmail.com on 6 Nov 2012 at 6:45

GoogleCodeExporter commented 8 years ago
yes my URL ends with .auth but I have registered HTTP handers in my web.config 
file like and I have deployed the same code from from this site...
my config file is like below

  <system.web>
    <sessionState mode="InProc" timeout="60" />
    <!--<authorization>
            <deny users="?" />
        </authorization>-->
    <!--<authentication mode="Forms">
      <forms loginUrl="ManualLogin.aspx" defaultUrl="welcome.aspx"/>
    </authentication>-->
    <!--<authentication mode="None"/>-->
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <httpHandlers>
      <add verb="*" path="*.sauth" type="Brickred.SocialAuth.NET.Core.CallbackHandler" />
    </httpHandlers>
    <httpModules>
      <add name="SocialAuthAuthentication" type="Brickred.SocialAuth.NET.Core.SocialAuthHttpModule" />
    </httpModules>
  </system.web>

So do I need to change something here in those lines of code????
please reply soon.

Thank You 

Anuj Sharma

Original comment by anuj.sharma@deft.in on 6 Nov 2012 at 7:06

GoogleCodeExporter commented 8 years ago
Code seems fine. Your URL should end with .sauth and not .auth. Can you reply 
the URL which is causing 404 error?

Deepak

Original comment by deepakag...@gmail.com on 6 Nov 2012 at 7:29

GoogleCodeExporter commented 8 years ago
ohh yes...its miss spelled actually...my mistake...
it is..

http://opensource.brickred.com/SocialAuthDemo/socialauth/validate.sauth?openid.n
s=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoi
nt=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2012-
11-06T07%3A08%3A39ZuQy-jrP4DYAMtQ&openid.return_to=http%3A%2F%2Fopensource.brick
red.com%2FSocialAuthDemo%2Fsocialauth%2Fvalidate.sauth&openid.assoc_handle=AMlYA
9VSv8YCfwCJKh2eENleupDZ50nd_fyo_ZrMOjfV42A1a5ZLHN2N&openid.signed=op_endpoint%2C
claimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cns
.ext2%2Cext1.mode%2Cext1.type.firstname%2Cext1.value.firstname%2Cext1.type.email
%2Cext1.value.email%2Cext1.type.language%2Cext1.value.language%2Cext1.type.lastn
ame%2Cext1.value.lastname%2Cext2.scope%2Cext2.request_token&openid.sig=tqfuCcYnK
wLU7yGf%2BydiQL0djCw%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%
2Fo8%2Fid%3Fid%3DAItOawlxyhC95eTYmtAwUsueQUW6_cSBmAew57U&openid.claimed_id=https
%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawlxyhC95eTYmtAwUsueQUW6
_cSBmAew57U&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.
mode=fetch_response&openid.ext1.type.firstname=http%3A%2F%2Faxschema.org%2FnameP
erson%2Ffirst&openid.ext1.value.firstname=Anuj&openid.ext1.type.email=http%3A%2F
%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.email=anuj.sharma%40deft.in&
openid.ext1.type.language=http%3A%2F%2Faxschema.org%2Fpref%2Flanguage&openid.ext
1.value.language=en&openid.ext1.type.lastname=http%3A%2F%2Faxschema.org%2FnamePe
rson%2Flast&openid.ext1.value.lastname=Sharma&openid.ns.ext2=http%3A%2F%2Fspecs.
openid.net%2Fextensions%2Foauth%2F1.0&openid.ext2.scope=http%3A%2F%2Fwww.google.
com%2Fm8%2Ffeeds%2F+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&o
penid.ext2.request_token=4%2FjGtncXmpvWyoiQcoNahKLl1dZNJf.YkyxXO95eO0VXE-sT2ZLcb
S9AR2pdQI

Original comment by anuj.sharma@deft.in on 6 Nov 2012 at 7:33

GoogleCodeExporter commented 8 years ago
I Need one more input. Can you please reply with the URL you see in your 
browser before you click on any provider's icon for login?

Deepak

Original comment by deepakag...@gmail.com on 6 Nov 2012 at 7:37

GoogleCodeExporter commented 8 years ago
oh sure its

http://opensource.brickred.com/socialauthdemo/

and i have made a change in host file at below address

C:\Windows\System32\Drivers\etc\hosts

and my file looks like this

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1   opensource.brickred.com

Original comment by anuj.sharma@deft.in on 6 Nov 2012 at 7:52

GoogleCodeExporter commented 8 years ago
Hi,

Have you added following just after </system.web> as is in our Web.Config (I 
guess you're using IIS7 in integrated mode which needs it)

 <!--IIS7 Support-->
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="socialAuth.NET" verb="*" path="*.sauth" type="Brickred.SocialAuth.NET.Core.CallbackHandler" />
    </handlers>
    <modules>
      <add name="SocialAuthAuthentication" type="Brickred.SocialAuth.NET.Core.SocialAuthHttpModule" />

    </modules>
  </system.webServer>

Deepak

Original comment by deepakag...@gmail.com on 6 Nov 2012 at 1:20

GoogleCodeExporter commented 8 years ago
Hi Sir,
 I have resolved that problem ...but still there is a problem all the details are fetched from facebook but email id is not being fetched from facebook.
So please tell me what kind  of permissions I need to give to login users .....

Thank You..

Anuj Sharma

Original comment by anuj.sharma@deft.in on 7 Nov 2012 at 7:55

GoogleCodeExporter commented 8 years ago
After login in facebook i m not able to get email id .Please help me.its very 
urgent.

Thank u

Anuj

Original comment by anuj.sharma@deft.in on 15 Nov 2012 at 6:23

GoogleCodeExporter commented 8 years ago
Please check the privacy settings set at Facebook for the user you are logging 
in with. If it is not set to everyone, Facebook doesn't sends EmailId. There is 
no issue with SocialAuth.net code.

Also, could you please specify how did you resolve 404 issue? Was it the 
missing WebServer configuration or did you made some other change?

Deepak

Original comment by deepakag...@gmail.com on 15 Nov 2012 at 9:46

GoogleCodeExporter commented 8 years ago
Is this privacy settings for the user who has created Consumer key and secret 
key?
or someone else?
 have changed privacy settings for the user who craeted consumer keys but did not get email id yet.

So please help me,its urgent...

thank you,

Anuj 

Original comment by anuj.sharma@deft.in on 15 Nov 2012 at 11:10

GoogleCodeExporter commented 8 years ago
Facebook Privacy settings of the end user who is using your application by 
logging into Facebook via SocialAuth.NET. Since, privacy settings are unknown 
of the user logging in, it is advisable not to create a design which always 
expect email Id of end user from Facebook.

Also, I re-iterate to mention solution of 404 issue to benefit others.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 15 Nov 2012 at 11:17

GoogleCodeExporter commented 8 years ago
when i tried to solve 404 issue on local system it did not work. but when i 
hosted my code on  web server it got worked.
it is working on webserver properly.

but facebook email id issue is still unresolved.i changed my facebook privacy 
settings to everyone but did not work yet. please help

 regards

Anuj

Original comment by anuj.sharma@deft.in on 16 Nov 2012 at 4:27

GoogleCodeExporter commented 8 years ago
Please try our demo site http://socialauth.in/socialauthdemo-net/Default.aspx 
and let us know if you get the email ID there? It is tested to always return 
email ID if privacy settings are set to share email ID to apps by FB user.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 17 Dec 2012 at 7:51

GoogleCodeExporter commented 8 years ago
I'm closing this issue on account of no reply. Please feel free to re-open it 
with response to last comment.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 6 Jan 2013 at 10:57