Giter Club home page Giter Club logo

Comments (4)

mvanholsteijn avatar mvanholsteijn commented on August 28, 2024

which browser are you using?

from auth0-login.

ProvTommyDunn avatar ProvTommyDunn commented on August 28, 2024

This seems to only occur in safari, as far as I know. I was able to solve by serving https, by making the following changes locally. Not sure if there is an easier/better way of doing this.

/auth0-login-master/auth0_login/saml/command.py
change line 17:
from:
from http.server import HTTPServer
to:
from http.server import HTTPServer, BaseHTTPRequestHandler
import ssl

change line 49:
from:
@Property
def callback_url(self):
return f'http://localhost:{setting.LISTEN_PORT}/saml'
to:
@Property
def callback_url(self):
return f'https://localhost:{setting.LISTEN_PORT}/saml'

change line 62:
from:
def accept_saml_response(self):
SAMLAccessTokenCallbackHandler.callback_url = self.callback_url
SAMLAccessTokenCallbackHandler.handler = (lambda r: self.set_saml_response(r))
httpd = HTTPServer(('0.0.0.0', self.listen_port), SAMLAccessTokenCallbackHandler)
httpd.handle_request()
httpd.server_close()

to:
def accept_saml_response(self):
SAMLAccessTokenCallbackHandler.callback_url = self.callback_url
SAMLAccessTokenCallbackHandler.handler = (lambda r: self.set_saml_response(r))
httpd = HTTPServer(('0.0.0.0', self.listen_port), SAMLAccessTokenCallbackHandler)
httpd.socket = ssl.wrap_socket (httpd.socket,
keyfile="/Users/test/Desktop/auth0-login-master/key.pem",
certfile='/Users/test/Desktop/auth0-login-master/cert.pem', server_side=True)
httpd.handle_request()
httpd.server_close()

from auth0-login.

mvanholsteijn avatar mvanholsteijn commented on August 28, 2024

Well, it is pretty difficult. For https to work, we need a certificate for 'localhost'. However, this is always a self-signed certificate which needs to be added to the trusted CA store of the local machine and/or browser.

from auth0-login.

ProvTommyDunn avatar ProvTommyDunn commented on August 28, 2024

@mvanholsteijn sorry for the delay in following up on this, I had to switch gears to a different project for a while. Do you know of a way to return the saml response so that it is not in a form?
Screen Shot 2019-06-08 at 9 54 06 AM
Screen Shot 2019-06-08 at 12 02 04 PM

from auth0-login.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.