Hello,
I keep getting the below error
403 POST /hub/lti13/oauth_login (10.42.0.1): '_xsrf' argument missing from POST
when using lti13 authentication in z2jh and I’m wondering how I can resolve this issue.
best
Hello,
I keep getting the below error
403 POST /hub/lti13/oauth_login (10.42.0.1): '_xsrf' argument missing from POST
when using lti13 authentication in z2jh and I’m wondering how I can resolve this issue.
best
Which version of LTI13 are you using? Are you overriding any login form templates?
My ltiauthenticator
version is 1.3.0. I downloaded it from here GitHub - jupyterhub/ltiauthenticator: A JupyterHub authenticator for LTI and installed it using pip install -e .
after modifying __init__
file to:
from ._version import __version__
from .lti11.auth import LTI11Authenticator as LTIAuthenticator
from .lti13.auth import LTI13Authenticator as LTI13Authenticator # this line added
I used the below piece of code in my z2jh values:
hub:
extraConfig:
auth: |
import ltiauthenticator
import re
class MyLTI13Authenticator(ltiauthenticator.lti13.auth.LTI13Authenticator):
def normalize_username(self, username):
return re.sub(r'[@.]+', '-', username)
c.JupyterHub.authenticator_class = MyLTI13Authenticator
c.LTI13Authenticator.issuer = "xxxx"
c.LTI13Authenticator.authorize_url = "xxxx"
c.LTI13Authenticator.jwks_endpoint = "xxxx"
c.LTI13Authenticator.client_id = "xxxx"
c.LTI13Authenticator.username_key = "email"
If you are using latest JupyterHub (>=4), I think you should use latest version of LTI authenticator. From GitHub, I see 1.6.1 is the latest one. Could you try it?
Thanks a lot. It worked after installing ltiauthenticator 1.6.1 but I had to add this line to my hub image:
RUN echo "from .lti13.auth import LTI13Authenticator as LTI13Authenticator" >> /usr/local/lib/python3.11/site-packages/ltiauthenticator/__init__.py
i’m using jupyterlab 4.3.5, jupyterhub 5.2.1 with jupyterhub-ltiauthenticator 1.6.2 and get the error for LTI 1.1 connections from Moodle. I already tried to ServerApp.disable_check_xsrf=True but it has no effect at all.
I upgraded my system and now i’m stuck.
I want to migrate from bitnami/jypterhub to z2jh 4.2.0, but I’m also stuck with this.
On the bitnami/jupyterhub deployment, I do not have this issue. Although it uses the same versions:
False positive! It was my mistake, the url for the LTI connection was wrongly configured.