django openid "Error using OpenID" - django

I am using django-openid from http://github.com/simonw/django-openid.
But no matter whatever openid i enter it gives out this error: "Error using OpenID", "The OpenID was invalid"
Update:
Got it to work with django-openid. It seems the error was because i was using localhost. So i had to create a local openid server to make it work.
Also i found out a better implementation of django openid, django-openid-auth hosted at https://launchpad.net/django-openid-auth.
A working example of django-openid-auth # http://www.rohanjain.in/.

From what I have heard Django-openid is incomplete. You might want to try out Django-Socialauth instead. It supports OpenID and gives you a few other options as well.

Related

cfldap useTLS failing and providing no information why it is failing

I am trying to use useTLS="true" with cfldap but the error i am getting is not very helpful. It just says error connecting to ldap server.
no logs and nothing, I am using CF2021.
This is my first time using cfldap and i am not sure what needs to be done to fix this issue. if i do not use useTLS, the cfldap is connected successfully.
any clue what could be going wrong here.
You may have to specify port="636", or some other port, depending on the LDAP server configuration.

django-rest-framework-social-oauth2: error 400 - redirect_uri_mismatch

I've been trying to add google login to my django app following this tutorial:
https://github.com/RealmTeam/django-rest-framework-social-oauth2
By following exactly the instructions, everything works fine in local.
However, when I try to replicate the same on the server, I get the following error on the redirect page of the login:
Error 400: redirect_uri_mismatch
redirect_uri: http://localhost:8000/auth/complete/google-oauth2/
What is strange to me is, in my google developer console, I have set up the correct redirect url in my app, as follows:
https://mydjangoapp.com/auth/complete/google-oauth2/
And I have also put 'mydjangoapp.com' under 'Authorised JavaScript origins'.
So my question is, why google keeps telling me that the redirect url is
http://localhost:8000/auth/complete/google-oauth2/
which is not the one I have set up in the console? Perhaps there is something obvious that I'm missing here. Thank you!
Why google keeps telling me that the redirect url is
Because your application is sending its in your code the app is running on http://localhost:8000 and if you are using a client library its probably adding the rest automatically.
http://localhost:8000/auth/complete/google-oauth2/
The redirect uri must exactly match what you are sending from your application.
You need to add
http://localhost:8000/auth/complete/google-oauth2/
Javascript origin is only needed if your code is using javascript.
This video will show you how to fix the error. Google OAuth2: How the fix redirect_uri_mismatch error. Part 2 server sided web applications.
If you want your code to send https://mydjangoapp.com then your going to have to be running it from https://mydjangoapp.com probably and you may need to figure out how to configure it so that it is running from the correct host.

Recaptcha: An internal error occurred

I'm using Recaptcha within Django. I was using the following tutorial to integrate it in my web application: http://www.marcofucci.com/tumblelog/26/jul/2009/integrating-recaptcha-with-django/
The captcha doesn't show up on my machine. Instead of the captcha the following error message is displayed:
An internal error occurred: 4A6376441D250.ADE1949.3546A435
(I get a different code each time).
To which domain did you sign the recaptcha? If you entered "127.0.0.1" in the registration make sure you use this one and not "localhost".
Today, I got this error on one of my client's website.
It was working great but suddenly it stop working. Then upon googling I find this link and renewed my API key.
But after I switched to Secure (SSL Enabled) side of my website then It stops working again.
Then, In I got this function there
recaptcha_get_html(PUBLIC_KEY, $error, true);
The third argumentation use the SSL Server, I've to enable it.
This fixed everything for me.

Where is documentation for openid1_claimed_id?

OpenID, using delegation, seems to be returning openid1_claimed_id instead of openid.claimed_id
That looks like “an OpenID 1 version of claimed_id” but I can't find it documented anywhere.
Miscellaneous details:
OpenID URL: http://www.zellyn.com/
Delegated to: http://zellyn.myopenid.com/
Using django-socialregistration
# Another query parameter that gets added to the return_to for
# OpenID 1; if the user's session state is lost, use this claimed
# identifier to do discovery when verifying the response.
openid1_return_to_identifier_name = 'openid1_claimed_id'
-- from the python-openid source.

Facebook Connect not setting cookies

I'm trying to implement Facebook Connect on a website with .NET MVC using C#.
I've followed the instructions here: http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect step by step. I can make the login work as in that when I log in through the site I'm also logged into Facebook.
In order to work with this in the server I think I need to access the cookies Facebook is supposed to leave like:
APIKEY_user
APIKEY_session_key
...
as mentioned here http://wiki.developers.facebook.com/index.php/Verifying_The_Signature.
The thing is I'm not getting any of these cookies. I've googled and it seems like I'm the only person with this problem. Any ideas as to what I could be doing wrong ? Has this happened to anyone else ?
The issue was that I was developing locally using localhost.
I resolved the problem by changing the settings for the application to point to a certain web address instead of localhost and changing my hosts file lo point that same web address to 127.0.0.1
from the UI/client-side perspective, always insure you have the correct path indicated for the xd_receiver file in your FB.init() method.
Firecookie is very useful for seeing what Cookies are/aren't being set.