I can't authenticate django locally to forest admin

I can’t authenticate django locally to forest admin

After following the steps one by one for the local installation of django & forest admin, I cannot connect to forest admin

Observed behavior

After creating a new django project and installing the django-forest-admin package I can’t connect to the forest admin interface

Failure Logs

I come across this error

On my terminal

System check identified no issues (0 silenced).
April 11, 2022 - 10:27:30
Django version 4.0.3, using settings 'siteweb.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
Not Found: /
[11/Apr/2022 10:27:35] "GET / HTTP/1.1" 404 2166
Not Found: /favicon.ico
[11/Apr/2022 10:27:36] "GET /favicon.ico HTTP/1.1" 404 2217
[11/Apr/2022 10:28:30] "OPTIONS /forest/authentication HTTP/1.1" 200 0
/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
[11/Apr/2022 10:28:31] "POST /forest/authentication HTTP/1.1" 200 1123
[11/Apr/2022 10:28:31] "OPTIONS /forest/authentication/callback?code=jkXGqAbTV_Nb-FV1KFNkfhbPIU4U3_-SlqmVGg_MDrcjrOPHxMUxmoq2l7OXcOzD&state=%7B%22renderingId%22%3A+124447%7D HTTP/1.1" 200 0
/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
Internal Server Error: /forest/authentication/callback
Traceback (most recent call last):
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 84, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 119, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/utils.py", line 21, in wrapper
    return f(*args, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/views/callback.py", line 144, in get
    token_body = self._verify_code_and_generate_token_body(callback_url, request)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/views/callback.py", line 126, in _verify_code_and_generate_token_body
    user = self._authenticate(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/views/callback.py", line 85, in _authenticate
    access_token_request = client.do_access_token_request(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oic/__init__.py", line 703, in do_access_token_request
    atr = super().do_access_token_request(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oauth2/__init__.py", line 919, in do_access_token_request
    return self.request_and_return(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oauth2/__init__.py", line 812, in request_and_return
    return self.parse_request_response(resp, response, body_type, state, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oauth2/__init__.py", line 753, in parse_request_response
    return self.parse_response(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oauth2/__init__.py", line 675, in parse_response
    verf = resp.verify(**kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oic/message.py", line 356, in verify
    self["id_token"] = verify_id_token(self, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oic/message.py", line 311, in verify_id_token
    if not idt.verify(**kwargs):
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oic/message.py", line 786, in verify
    raise IATError("Issued in the future")
oic.oic.message.IATError: Issued in the future
[11/Apr/2022 10:28:31] "GET /forest/authentication/callback?code=jkXGqAbTV_Nb-FV1KFNkfhbPIU4U3_-SlqmVGg_MDrcjrOPHxMUxmoq2l7OXcOzD&state=%7B%22renderingId%22%3A+124447%7D HTTP/1.1" 500 157378
[11/Apr/2022 10:29:30] "OPTIONS /forest HTTP/1.1" 200 0
[11/Apr/2022 10:29:30] "GET /forest HTTP/1.1" 204 0
/home/eduba/scripts/envoi forest/django/siteweb/siteweb/settings.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

On my browser

Context


KeyError at /forest/authentication/callback

'access_token'

Request Method: 	GET
Request URL: 	http://127.0.0.1:8000/forest/authentication/callback?code=QJLJIufX_80XqU86Y-SRvJvI-YQLR7hJPLpfiFdzOK-Ambe660NzBQ4NmUOskJm9&state=%7B%22renderingId%22%3A+124674%7D
Django Version: 	4.0.3
Exception Type: 	KeyError
Exception Value: 	

'access_token'

Exception Location: 	/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oauth2/message.py, line 762, in __getitem__
Python Executable: 	/home/eduba/scripts/envoi forest/django/venv/bin/python3
Python Version: 	3.10.2
Python Path: 	

['/home/eduba/scripts/envoi forest/django/siteweb',
 '/usr/lib/python310.zip',
 '/usr/lib/python3.10',
 '/usr/lib/python3.10/lib-dynload',
 '/home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages']

Server time: 	Mon, 11 Apr 2022 10:31:49 +0000
Traceback Switch to copy-and-paste view

    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/core/handlers/exception.py, line 55, in inner

                        response = get_response(request)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/core/handlers/base.py, line 197, in _get_response

                        response = wrapped_callback(request, *callback_args, **callback_kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/views/generic/base.py, line 84, in view

                    return self.dispatch(request, *args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django/views/generic/base.py, line 119, in dispatch

                return handler(request, *args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/utils.py, line 21, in wrapper

                    return f(*args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/views/callback.py, line 144, in get

                token_body = self._verify_code_and_generate_token_body(callback_url, request)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/views/callback.py, line 126, in _verify_code_and_generate_token_body

                user = self._authenticate(

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/django_forest/authentication/views/callback.py, line 96, in _authenticate

                headers = {'forest-token': access_token_request['access_token']}

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.10/site-packages/oic/oauth2/message.py, line 762, in __getitem__

                return self._dict[item]

         …
    Local vars

Request information
USER

AnonymousUser
GET
Variable 	Value
code 	

'QJLJIufX_80XqU86Y-SRvJvI-YQLR7hJPLpfiFdzOK-Ambe660NzBQ4NmUOskJm9'

state 	

'{"renderingId": 124674}'

POST

No POST data
FILES

No FILES data
COOKIES

No cookie data
META
Variable 	Value
COLORTERM 	

'truecolor'

CONTENT_LENGTH 	

''

CONTENT_TYPE 	

'text/plain'

CUDA_PATH 	

'/opt/cuda'

DBUS_SESSION_BUS_ADDRESS 	

'unix:path=/run/user/1000/bus,guid=6e3fca3543301dfe42c73da56253fbbf'

DBUS_STARTER_ADDRESS 	

'unix:path=/run/user/1000/bus,guid=6e3fca3543301dfe42c73da56253fbbf'

DBUS_STARTER_BUS_TYPE 	

'session'

DESKTOP_SESSION 	

'gnome'

DISPLAY 	

':1'

DJANGO_SETTINGS_MODULE 	

'siteweb.settings'

EDITOR 	

'/usr/bin/nano'

GATEWAY_INTERFACE 	

'CGI/1.1'

GDMSESSION 	

'gnome'

GDM_LANG 	

'fr_FR.UTF-8'

GNOME_TERMINAL_SCREEN 	

'/org/gnome/Terminal/screen/a409c28c_5e1e_48f8_bac3_e670f6dcd34b'

GNOME_TERMINAL_SERVICE 	

':1.88'

GTK3_MODULES 	

'xapp-gtk3-module'

HOME 	

'/home/eduba'

HTTP_ACCEPT 	

'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8'

HTTP_ACCEPT_ENCODING 	

'gzip, deflate, br'

HTTP_ACCEPT_LANGUAGE 	

'en-US,en;q=0.5'

HTTP_CONNECTION 	

'keep-alive'

HTTP_HOST 	

'127.0.0.1:8000'

HTTP_SEC_FETCH_DEST 	

'document'

HTTP_SEC_FETCH_MODE 	

'navigate'

HTTP_SEC_FETCH_SITE 	

'none'

HTTP_SEC_FETCH_USER 	

'?1'

HTTP_UPGRADE_INSECURE_REQUESTS 	

'1'

HTTP_USER_AGENT 	

'Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0'

INSIDE_NAUTILUS_PYTHON 	

''

LANG 	

'fr_FR.UTF-8'

LC_ADDRESS 	

'fr_FR.UTF-8'

LC_IDENTIFICATION 	

'fr_FR.UTF-8'

LC_MEASUREMENT 	

'fr_FR.UTF-8'

LC_MONETARY 	

'fr_FR.UTF-8'

LC_NAME 	

'fr_FR.UTF-8'

LC_NUMERIC 	

'fr_FR.UTF-8'

LC_PAPER 	

'fr_FR.UTF-8'

LC_TELEPHONE 	

'fr_FR.UTF-8'

LC_TIME 	

'fr_FR.UTF-8'

LESS 	

'-R'

LESS_TERMCAP_mb 	

'\x1b[01;32m'

LESS_TERMCAP_md 	

'\x1b[01;32m'

LESS_TERMCAP_me 	

'\x1b[0m'

LESS_TERMCAP_se 	

'\x1b[0m'

LESS_TERMCAP_so 	

'\x1b[01;47;34m'

LESS_TERMCAP_ue 	

'\x1b[0m'

LESS_TERMCAP_us 	

'\x1b[01;36m'

LOGNAME 	

'eduba'

LS_COLORS 	

'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'

LS_OPTIONS 	

'--color=auto'

MAIL 	

'/var/spool/mail/eduba'

MOTD_SHOWN 	

'pam'

MOZ_ENABLE_WAYLAND 	

'1'

OLDPWD 	

'/home/eduba/scripts/envoi forest/django'

P9K_SSH 	

'0'

P9K_TTY 	

'old'

PATH 	

('/home/eduba/scripts/envoi '
 'forest/django/venv/bin:/home/eduba/.local/bin:/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin:/usr/local/sbin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl')

PATH_INFO 	

'/forest/authentication/callback'

PKGFILE_PROMPT_INSTALL_MISSING 	

'1'

PS1 	

('(venv) '
 '${$((_p9k_on_expand()))+}%{${_p9k__raw_msg-}${_p9k__raw_msg::=}%}${(e)_p9k_t[7]}${_p9k__1-${${:-${_p9k__d::=0}${_p9k__rprompt::=${_p9k__1r-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=8}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+10}}${_p9k__n:=11}${_p9k__v::="✔"}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rstatus+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{002\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{002\\} '
 '%b%K{000\\}%F{002\\}}${_p9k__sss::=%b%K{000\\}%F{002\\} '
 '}${_p9k__i::=1}${_p9k__bg::=000}}+}}${${:-"${${(%):-%j}:#0}"}:+${${:-${P9K_CONTENT::=""}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=12}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+14}}${_p9k__n:=15}${_p9k__v::=\uf013}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rbackground_jobs+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{006\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{006\\} '
 '%b%K{000\\}%F{006\\}}${_p9k__sss::=%b%K{000\\}%F{006\\} '
 '}${_p9k__i::=3}${_p9k__bg::=000}}+}}}${${:-"$DIRENV_DIR"}:+${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=16}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+18}}${_p9k__n:=19}${_p9k__v::=▼}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rdirenv+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{003\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{003\\} '
 '%b%K{000\\}%F{003\\}}${_p9k__sss::=%b%K{000\\}%F{003\\} '
 '}${_p9k__i::=4}${_p9k__bg::=000}}+}}}${${:-"${${(%):-%#}:#\\#}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=20}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+22}}${_p9k__n:=23}${_p9k__c::=}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{003\\}${${:-${_p9k__w::=%b%K{000\\}%F{003\\} '
 '%b%K{000\\}%F{003\\}}${_p9k__sss::=%b%K{000\\}%F{003\\} '
 '}${_p9k__i::=30}${_p9k__bg::=000}}+}}}${${:-"${${(%):-%#}:#\\%}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=24}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+26}}${_p9k__n:=27}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{001\\}${${:-${_p9k__w::=%b%K{000\\}%F{001\\} '
 '%b%K{000\\}%F{001\\}}${_p9k__sss::=%b%K{000\\}%F{001\\} '
 '}${_p9k__i::=30}${_p9k__bg::=000}}+}}}${${:-"${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}"}:+${${:-${P9K_CONTENT::=OVERTYPE}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=28}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(003|003)}:+30}}${_p9k__n:=31}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{003\\}%F{000\\}${${:-${_p9k__w::=%b%K{003\\}%F{000\\} '
 '%b%K{003\\}%F{000\\}}${_p9k__sss::=%b%K{003\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=003}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}"}:+${${:-${P9K_CONTENT::=NORMAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=32}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(002|002)}:+34}}${_p9k__n:=35}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{002\\}%F{000\\}${${:-${_p9k__w::=%b%K{002\\}%F{000\\} '
 '%b%K{002\\}%F{000\\}}${_p9k__sss::=%b%K{002\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=002}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}"}:+${${:-${P9K_CONTENT::=VISUAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=36}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(004|004)}:+38}}${_p9k__n:=39}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{004\\}%F{000\\}${${:-${_p9k__w::=%b%K{004\\}%F{000\\} '
 '%b%K{004\\}%F{000\\}}${_p9k__sss::=%b%K{004\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=004}}+}}}$_p9k__sss%b%k%f}}${_p9k__lprompt::=${_p9k__1l-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=%f}}+}${${:-${P9K_CONTENT::=\uf312}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=40}}${_p9k__n:=${${(M)${:-x007}:#x($_p9k__bg|${_p9k__bg:-0})}:+42}}${_p9k__n:=43}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1los_icon+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__c}%b%K{007\\}%F{030\\} '
 '${${:-${_p9k__s::=%F{007\\}\ue0b0}${_p9k__ss::=\ue0b1}${_p9k__sss::=%F{007\\}\ue0b0}${_p9k__i::=1}${_p9k__bg::=007}}+}}${${:-${P9K_CONTENT::="%{d%}${:-"%B%F{255}"}${(Q)${:-"\\\\~"}}${:-"%b%K{030}%F{254}"}/${${${_p9k__d:#-*}:+scripts}:-${:-"%F{250}"}s${:-"%b%K{030}%F{254}"}${$((_p9k__d+=6))+}}/${${${_p9k__d:#-*}:+envoi '
 'forest}:-${:-"%F{250}"}e${:-"%b%K{030}%F{254}"}${$((_p9k__d+=11))+}}/${:-"%B%F{255}"}django${:-"%b%K{030}%F{254}"}%{d%}"}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=88}}${_p9k__n:=${${(M)${:-x030}:#x($_p9k__bg|${_p9k__bg:-0})}:+90}}${_p9k__n:=91}${_p9k__v::=\uf07c}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1ldir+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__v}${${(M)_p9k__e:#11}:+ '
 '}${_p9k__c}%b%K{030\\}%F{254\\} '
 '${${:-${_p9k__s::=%F{030\\}\ue0b0}${_p9k__ss::=\ue0b1}${_p9k__sss::=%F{030\\}\ue0b0}${_p9k__i::=2}${_p9k__bg::=030}}+}}${(e)_p9k__vcs}%b%k$_p9k__sss%b%k%f${:-" '
 '%b%k%f"}}}}+}${(e)_p9k_t[6]}${${_p9k__h::=40.}+}${${_p9k__d::=$((_p9k__m-_p9k__h))}+}${_p9k__lprompt/\\%\\{d\\%\\}*\\%\\{d\\%\\}/${_p9k__1ldir-${:-"%B%F{255}"}${(Q)${:-"\\\\~"}}${:-"%b%K{030}%F{254}"}/${${${_p9k__d:#-*}:+scripts}:-${:-"%F{250}"}s${:-"%b%K{030}%F{254}"}${$((_p9k__d+=6))+}}/${${${_p9k__d:#-*}:+envoi '
 'forest}:-${:-"%F{250}"}e${:-"%b%K{030}%F{254}"}${$((_p9k__d+=11))+}}/${:-"%B%F{255}"}django${:-"%b%K{030}%F{254}"}}}${${_p9k__m::=$((_p9k__d+_p9k__h))}+}}${${COLUMNS::=$_p9k__clm}+}')

PWD 	

'/home/eduba/scripts/envoi forest/django/siteweb'

QT_AUTO_SCREEN_SCALE_FACTOR 	

'1'

QT_IM_MODULE 	

'ibus'

QT_QPA_PLATFORMTHEME 	

'qt5ct'

QUERY_STRING 	

'code=QJLJIufX_80XqU86Y-SRvJvI-YQLR7hJPLpfiFdzOK-Ambe660NzBQ4NmUOskJm9&state=%7B%22renderingId%22%3A+124674%7D'

REMOTE_ADDR 	

'127.0.0.1'

REMOTE_HOST 	

''

REQUEST_METHOD 	

'GET'

RUN_MAIN 	

'true'

SCRIPT_NAME 	

''

SERVER_NAME 	

'localhost'

SERVER_PORT 	

'8000'

SERVER_PROTOCOL 	

'HTTP/1.1'

SERVER_SOFTWARE 	

'WSGIServer/0.2'

SESSION_MANAGER 	

'local/stellaris:@/tmp/.ICE-unix/1472,unix/stellaris:/tmp/.ICE-unix/1472'

SHELL 	

'/bin/zsh'

SHLVL 	

'1'

SSH_AUTH_SOCK 	

'/run/user/1000/keyring/ssh'

SYSTEMD_EXEC_PID 	

'1472'

TERM 	

'xterm-256color'

TZ 	

'UTC'

USER 	

'eduba'

USERNAME 	

'eduba'

VIRTUAL_ENV 	

'/home/eduba/scripts/envoi forest/django/venv'

VIRTUAL_ENV_PROMPT 	

'(venv) '

VTE_VERSION 	

'6602'

WINDOWPATH 	

'2'

XAUTHORITY 	

'/run/user/1000/gdm/Xauthority'

XDG_CURRENT_DESKTOP 	

'GNOME'

XDG_DATA_DIRS 	

'/home/eduba/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'

XDG_MENU_PREFIX 	

'gnome-'

XDG_RUNTIME_DIR 	

'/run/user/1000'

XDG_SESSION_CLASS 	

'user'

XDG_SESSION_DESKTOP 	

'gnome'

XDG_SESSION_TYPE 	

'x11'

XMODIFIERS 	

'@im=ibus'

_ 	

'/home/eduba/scripts/envoi forest/django/venv/bin/python3'

_P9K_TTY 	

'/dev/pts/0'

wsgi.errors 	

<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>

wsgi.file_wrapper 	

<class 'wsgiref.util.FileWrapper'>

wsgi.input 	

<django.core.handlers.wsgi.LimitedStream object at 0x7f68c71d9d20>

wsgi.multiprocess 	

False

wsgi.multithread 	

True

wsgi.run_once 	

False

wsgi.url_scheme 	

'http'

wsgi.version 	

(1, 0)

Settings
Using settings module siteweb.settings
Setting 	Value
ABSOLUTE_URL_OVERRIDES 	

{}

ADMINS 	

[]

ALLOWED_HOSTS 	

['*']

APPEND_SLASH 	

False

AUTHENTICATION_BACKENDS 	

['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS 	

'********************'

AUTH_USER_MODEL 	

'auth.User'

BASE_DIR 	

PosixPath('/home/eduba/scripts/envoi forest/django/siteweb')

CACHES 	

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

CACHE_MIDDLEWARE_ALIAS 	

'default'

CACHE_MIDDLEWARE_KEY_PREFIX 	

'********************'

CACHE_MIDDLEWARE_SECONDS 	

600

CORS_ALLOWED_ORIGIN_REGEXES 	

['.*\\.forestadmin\\.com.*']

CORS_ALLOW_CREDENTIALS 	

True

CORS_ALLOW_HEADERS 	

['accept',
 'accept-encoding',
 'authorization',
 'content-type',
 'dnt',
 'origin',
 'user-agent',
 'x-csrftoken',
 'x-requested-with',
 'forest-context-url']

CORS_ORIGIN_ALLOW_ALL 	

True

CORS_REPLACE_HTTPS_REFERER 	

True

CSRF_COOKIE_AGE 	

31449600

CSRF_COOKIE_DOMAIN 	

None

CSRF_COOKIE_HTTPONLY 	

False

CSRF_COOKIE_NAME 	

'csrftoken'

CSRF_COOKIE_PATH 	

'/'

CSRF_COOKIE_SAMESITE 	

'Lax'

CSRF_COOKIE_SECURE 	

False

CSRF_FAILURE_VIEW 	

'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME 	

'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS 	

[]

CSRF_USE_SESSIONS 	

False

DATABASES 	

{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.sqlite3',
             'HOST': '',
             'NAME': PosixPath('/home/eduba/scripts/envoi forest/django/siteweb/db.sqlite3'),
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIGRATE': True,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': ''}}

DATABASE_ROUTERS 	

[]

DATA_UPLOAD_MAX_MEMORY_SIZE 	

2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS 	

1000

DATETIME_FORMAT 	

'N j, Y, P'

DATETIME_INPUT_FORMATS 	

['%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M']

DATE_FORMAT 	

'N j, Y'

DATE_INPUT_FORMATS 	

['%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y']

DEBUG 	

True

DEBUG_PROPAGATE_EXCEPTIONS 	

False

DECIMAL_SEPARATOR 	

'.'

DEFAULT_AUTO_FIELD 	

'django.db.models.BigAutoField'

DEFAULT_CHARSET 	

'utf-8'

DEFAULT_EXCEPTION_REPORTER 	

'django.views.debug.ExceptionReporter'

DEFAULT_EXCEPTION_REPORTER_FILTER 	

'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE 	

'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL 	

'webmaster@localhost'

DEFAULT_INDEX_TABLESPACE 	

''

DEFAULT_TABLESPACE 	

''

DISALLOWED_USER_AGENTS 	

[]

EMAIL_BACKEND 	

'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST 	

'localhost'

EMAIL_HOST_PASSWORD 	

'********************'

EMAIL_HOST_USER 	

''

EMAIL_PORT 	

25

EMAIL_SSL_CERTFILE 	

None

EMAIL_SSL_KEYFILE 	

'********************'

EMAIL_SUBJECT_PREFIX 	

'[Django] '

EMAIL_TIMEOUT 	

None

EMAIL_USE_LOCALTIME 	

False

EMAIL_USE_SSL 	

False

EMAIL_USE_TLS 	

False

FILE_UPLOAD_DIRECTORY_PERMISSIONS 	

None

FILE_UPLOAD_HANDLERS 	

['django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE 	

2621440

FILE_UPLOAD_PERMISSIONS 	

420

FILE_UPLOAD_TEMP_DIR 	

None

FIRST_DAY_OF_WEEK 	

0

FIXTURE_DIRS 	

[]

FORCE_SCRIPT_NAME 	

None

FOREST 	

{'APPLICATION_URL': 'http://localhost:8000',
 'FOREST_AUTH_SECRET': '********************',
 'FOREST_ENV_SECRET': '********************',
 'FOREST_URL': 'https://api.forestadmin.com'}

FORMAT_MODULE_PATH 	

None

FORM_RENDERER 	

'django.forms.renderers.DjangoTemplates'

IGNORABLE_404_URLS 	

[]

INSTALLED_APPS 	

['django_forest',
 'django.contrib.admin',
 'corsheaders',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']

INTERNAL_IPS 	

[]

LANGUAGE_CODE 	

'en-us'

LANGUAGE_COOKIE_AGE 	

None

LANGUAGE_COOKIE_DOMAIN 	

None

LANGUAGE_COOKIE_HTTPONLY 	

False

LANGUAGE_COOKIE_NAME 	

'django_language'

LANGUAGE_COOKIE_PATH 	

'/'

LANGUAGE_COOKIE_SAMESITE 	

None

LANGUAGE_COOKIE_SECURE 	

False

LOCALE_PATHS 	

[]

LOGGING 	

{}

LOGGING_CONFIG 	

'logging.config.dictConfig'

LOGIN_REDIRECT_URL 	

'/accounts/profile/'

LOGIN_URL 	

'/accounts/login/'

LOGOUT_REDIRECT_URL 	

None

MANAGERS 	

[]

MEDIA_ROOT 	

''

MEDIA_URL 	

'/'

MESSAGE_STORAGE 	

'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE 	

['django_forest.middleware.IpWhitelistMiddleware',
 'django_forest.middleware.PermissionMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'corsheaders.middleware.CorsPostCsrfMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']

MIGRATION_MODULES 	

{}

MONTH_DAY_FORMAT 	

'F j'

NUMBER_GROUPING 	

0

PASSWORD_HASHERS 	

'********************'

PASSWORD_RESET_TIMEOUT 	

'********************'

PREPEND_WWW 	

False

ROOT_URLCONF 	

'siteweb.urls'

SECRET_KEY 	

'********************'

SECURE_CONTENT_TYPE_NOSNIFF 	

True

SECURE_CROSS_ORIGIN_OPENER_POLICY 	

'same-origin'

SECURE_HSTS_INCLUDE_SUBDOMAINS 	

False

SECURE_HSTS_PRELOAD 	

False

SECURE_HSTS_SECONDS 	

0

SECURE_PROXY_SSL_HEADER 	

None

SECURE_REDIRECT_EXEMPT 	

[]

SECURE_REFERRER_POLICY 	

'same-origin'

SECURE_SSL_HOST 	

None

SECURE_SSL_REDIRECT 	

False

SERVER_EMAIL 	

'root@localhost'

SESSION_CACHE_ALIAS 	

'default'

SESSION_COOKIE_AGE 	

1209600

SESSION_COOKIE_DOMAIN 	

None

SESSION_COOKIE_HTTPONLY 	

True

SESSION_COOKIE_NAME 	

'sessionid'

SESSION_COOKIE_PATH 	

'/'

SESSION_COOKIE_SAMESITE 	

'Lax'

SESSION_COOKIE_SECURE 	

False

SESSION_ENGINE 	

'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE 	

False

SESSION_FILE_PATH 	

None

SESSION_SAVE_EVERY_REQUEST 	

False

SESSION_SERIALIZER 	

'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE 	

'siteweb.settings'

SHORT_DATETIME_FORMAT 	

'm/d/Y P'

SHORT_DATE_FORMAT 	

'm/d/Y'

SIGNING_BACKEND 	

'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS 	

[]

STATICFILES_DIRS 	

[]

STATICFILES_FINDERS 	

['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE 	

'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT 	

None

STATIC_URL 	

'/static/'

TEMPLATES 	

[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': [],
  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages']}}]

TEST_NON_SERIALIZED_APPS 	

[]

TEST_RUNNER 	

'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR 	

','

TIME_FORMAT 	

'P'

TIME_INPUT_FORMATS 	

['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE 	

'UTC'

USE_DEPRECATED_PYTZ 	

False

USE_I18N 	

True

USE_L10N 	

True

USE_THOUSAND_SEPARATOR 	

False

USE_TZ 	

True

USE_X_FORWARDED_HOST 	

False

USE_X_FORWARDED_PORT 	

False

WSGI_APPLICATION 	

'siteweb.wsgi.application'

X_FRAME_OPTIONS 	

'DENY'

YEAR_MONTH_FORMAT 	

'F Y'

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

Hi @MikaelMonjour,

I’m going to check our logs to see whats happen when you try to connect your agent.
I’ll come back to you when I have more data about your exception.

Thank’s

1 Like

Hi @MikaelMonjour,

Could you, try to run your project with python 3.9?
I only reproduce your issue with python >= 3.10.
Currently I’m investigating it to fix it on python 3.10.

Thank’s

unfortunately it still doesn’t work (here with 3.8)


KeyError at /forest/authentication/callback

'access_token'

Request Method: 	GET
Request URL: 	http://127.0.0.1:8000/forest/authentication/callback?code=54DSdtk8Po4TabRHgxW_qyW7tYRIEt4uasLmbW6YIJif2xR30LSljel9p4Sn5lRN&state=%7B%22renderingId%22%3A+124844%7D
Django Version: 	4.0.4
Exception Type: 	KeyError
Exception Value: 	

'access_token'

Exception Location: 	/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/message.py, line 762, in __getitem__
Python Executable: 	/home/eduba/scripts/envoi forest/django/venv/bin/python
Python Version: 	3.8.13
Python Path: 	

['/home/eduba/scripts/envoi forest/django/siteweb',
 '/usr/lib/python38.zip',
 '/usr/lib/python3.8',
 '/usr/lib/python3.8/lib-dynload',
 '/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages']

Server time: 	Tue, 12 Apr 2022 09:51:36 +0000
Traceback Switch to copy-and-paste view

    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/core/handlers/exception.py, line 55, in inner

                        response = get_response(request)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/core/handlers/base.py, line 197, in _get_response

                        response = wrapped_callback(request, *callback_args, **callback_kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/views/generic/base.py, line 84, in view

                    return self.dispatch(request, *args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/views/generic/base.py, line 119, in dispatch

                return handler(request, *args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/utils.py, line 21, in wrapper

                    return f(*args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py, line 144, in get

                token_body = self._verify_code_and_generate_token_body(callback_url, request)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py, line 126, in _verify_code_and_generate_token_body

                user = self._authenticate(

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py, line 96, in _authenticate

                headers = {'forest-token': access_token_request['access_token']}

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/message.py, line 762, in __getitem__

                return self._dict[item]

         …
    Local vars

Request information
USER

AnonymousUser
GET
Variable 	Value
code 	

'54DSdtk8Po4TabRHgxW_qyW7tYRIEt4uasLmbW6YIJif2xR30LSljel9p4Sn5lRN'

state 	

'{"renderingId": 124844}'

POST

No POST data
FILES

No FILES data
COOKIES

No cookie data
META
Variable 	Value
COLORTERM 	

'truecolor'

CONTENT_LENGTH 	

''

CONTENT_TYPE 	

'text/plain'

CUDA_PATH 	

'/opt/cuda'

DBUS_SESSION_BUS_ADDRESS 	

'unix:path=/run/user/1000/bus,guid=f0021c4b455b39ce7a43641362553c75'

DBUS_STARTER_ADDRESS 	

'unix:path=/run/user/1000/bus,guid=f0021c4b455b39ce7a43641362553c75'

DBUS_STARTER_BUS_TYPE 	

'session'

DESKTOP_SESSION 	

'gnome'

DISPLAY 	

':1'

DJANGO_SETTINGS_MODULE 	

'siteweb.settings'

EDITOR 	

'/usr/bin/nano'

GATEWAY_INTERFACE 	

'CGI/1.1'

GDMSESSION 	

'gnome'

GDM_LANG 	

'fr_FR.UTF-8'

GNOME_TERMINAL_SCREEN 	

'/org/gnome/Terminal/screen/001184f1_05ab_4faf_9c7a_fcfae586f7ca'

GNOME_TERMINAL_SERVICE 	

':1.94'

GTK3_MODULES 	

'xapp-gtk3-module'

HOME 	

'/home/eduba'

HTTP_ACCEPT 	

'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8'

HTTP_ACCEPT_ENCODING 	

'gzip, deflate, br'

HTTP_ACCEPT_LANGUAGE 	

'en-US,en;q=0.5'

HTTP_CONNECTION 	

'keep-alive'

HTTP_HOST 	

'127.0.0.1:8000'

HTTP_SEC_FETCH_DEST 	

'document'

HTTP_SEC_FETCH_MODE 	

'navigate'

HTTP_SEC_FETCH_SITE 	

'none'

HTTP_SEC_FETCH_USER 	

'?1'

HTTP_UPGRADE_INSECURE_REQUESTS 	

'1'

HTTP_USER_AGENT 	

'Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0'

INSIDE_NAUTILUS_PYTHON 	

''

LANG 	

'fr_FR.UTF-8'

LC_ADDRESS 	

'fr_FR.UTF-8'

LC_IDENTIFICATION 	

'fr_FR.UTF-8'

LC_MEASUREMENT 	

'fr_FR.UTF-8'

LC_MONETARY 	

'fr_FR.UTF-8'

LC_NAME 	

'fr_FR.UTF-8'

LC_NUMERIC 	

'fr_FR.UTF-8'

LC_PAPER 	

'fr_FR.UTF-8'

LC_TELEPHONE 	

'fr_FR.UTF-8'

LC_TIME 	

'fr_FR.UTF-8'

LESS 	

'-R'

LESS_TERMCAP_mb 	

'\x1b[01;32m'

LESS_TERMCAP_md 	

'\x1b[01;32m'

LESS_TERMCAP_me 	

'\x1b[0m'

LESS_TERMCAP_se 	

'\x1b[0m'

LESS_TERMCAP_so 	

'\x1b[01;47;34m'

LESS_TERMCAP_ue 	

'\x1b[0m'

LESS_TERMCAP_us 	

'\x1b[01;36m'

LOGNAME 	

'eduba'

LS_COLORS 	

'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'

LS_OPTIONS 	

'--color=auto'

MAIL 	

'/var/spool/mail/eduba'

MOTD_SHOWN 	

'pam'

MOZ_ENABLE_WAYLAND 	

'1'

OLDPWD 	

'/home/eduba/scripts/envoi forest/django'

P9K_SSH 	

'0'

P9K_TTY 	

'old'

PATH 	

('/home/eduba/scripts/envoi '
 'forest/django/venv/bin:/home/eduba/.local/bin:/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin:/usr/local/sbin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl')

PATH_INFO 	

'/forest/authentication/callback'

PKGFILE_PROMPT_INSTALL_MISSING 	

'1'

PS1 	

('(venv) '
 '${$((_p9k_on_expand()))+}%{${_p9k__raw_msg-}${_p9k__raw_msg::=}%}${(e)_p9k_t[7]}${_p9k__1-${${:-${_p9k__d::=0}${_p9k__rprompt::=${_p9k__1r-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=8}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+10}}${_p9k__n:=11}${_p9k__v::="✔"}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rstatus+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{002\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{002\\} '
 '%b%K{000\\}%F{002\\}}${_p9k__sss::=%b%K{000\\}%F{002\\} '
 '}${_p9k__i::=1}${_p9k__bg::=000}}+}}${${:-"${${(%):-%j}:#0}"}:+${${:-${P9K_CONTENT::=""}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=12}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+14}}${_p9k__n:=15}${_p9k__v::=\uf013}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rbackground_jobs+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{006\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{006\\} '
 '%b%K{000\\}%F{006\\}}${_p9k__sss::=%b%K{000\\}%F{006\\} '
 '}${_p9k__i::=3}${_p9k__bg::=000}}+}}}${${:-"${${(%):-%#}:#\\#}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=20}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+22}}${_p9k__n:=23}${_p9k__c::=}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{003\\}${${:-${_p9k__w::=%b%K{000\\}%F{003\\} '
 '%b%K{000\\}%F{003\\}}${_p9k__sss::=%b%K{000\\}%F{003\\} '
 '}${_p9k__i::=30}${_p9k__bg::=000}}+}}}${${:-"${${(%):-%#}:#\\%}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=24}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+26}}${_p9k__n:=27}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{001\\}${${:-${_p9k__w::=%b%K{000\\}%F{001\\} '
 '%b%K{000\\}%F{001\\}}${_p9k__sss::=%b%K{000\\}%F{001\\} '
 '}${_p9k__i::=30}${_p9k__bg::=000}}+}}}${${:-"${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}"}:+${${:-${P9K_CONTENT::=OVERTYPE}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=28}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(003|003)}:+30}}${_p9k__n:=31}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{003\\}%F{000\\}${${:-${_p9k__w::=%b%K{003\\}%F{000\\} '
 '%b%K{003\\}%F{000\\}}${_p9k__sss::=%b%K{003\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=003}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}"}:+${${:-${P9K_CONTENT::=NORMAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=32}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(002|002)}:+34}}${_p9k__n:=35}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{002\\}%F{000\\}${${:-${_p9k__w::=%b%K{002\\}%F{000\\} '
 '%b%K{002\\}%F{000\\}}${_p9k__sss::=%b%K{002\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=002}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}"}:+${${:-${P9K_CONTENT::=VISUAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=36}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(004|004)}:+38}}${_p9k__n:=39}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{004\\}%F{000\\}${${:-${_p9k__w::=%b%K{004\\}%F{000\\} '
 '%b%K{004\\}%F{000\\}}${_p9k__sss::=%b%K{004\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=004}}+}}}$_p9k__sss%b%k%f}}${_p9k__lprompt::=${_p9k__1l-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=%f}}+}${${:-${P9K_CONTENT::=\uf312}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=40}}${_p9k__n:=${${(M)${:-x007}:#x($_p9k__bg|${_p9k__bg:-0})}:+42}}${_p9k__n:=43}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1los_icon+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__c}%b%K{007\\}%F{030\\} '
 '${${:-${_p9k__s::=%F{007\\}\ue0b0}${_p9k__ss::=\ue0b1}${_p9k__sss::=%F{007\\}\ue0b0}${_p9k__i::=1}${_p9k__bg::=007}}+}}${${:-${P9K_CONTENT::="%{d%}${:-"%B%F{255}"}${(Q)${:-"\\\\~"}}${:-"%b%K{030}%F{254}"}/${${${_p9k__d:#-*}:+scripts}:-${:-"%F{250}"}s${:-"%b%K{030}%F{254}"}${$((_p9k__d+=6))+}}/${${${_p9k__d:#-*}:+envoi '
 'forest}:-${:-"%F{250}"}e${:-"%b%K{030}%F{254}"}${$((_p9k__d+=11))+}}/${:-"%B%F{255}"}django${:-"%b%K{030}%F{254}"}%{d%}"}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=88}}${_p9k__n:=${${(M)${:-x030}:#x($_p9k__bg|${_p9k__bg:-0})}:+90}}${_p9k__n:=91}${_p9k__v::=\uf07c}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1ldir+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__v}${${(M)_p9k__e:#11}:+ '
 '}${_p9k__c}%b%K{030\\}%F{254\\} '
 '${${:-${_p9k__s::=%F{030\\}\ue0b0}${_p9k__ss::=\ue0b1}${_p9k__sss::=%F{030\\}\ue0b0}${_p9k__i::=2}${_p9k__bg::=030}}+}}${(e)_p9k__vcs}%b%k$_p9k__sss%b%k%f${:-" '
 '%b%k%f"}}}}+}${(e)_p9k_t[6]}${${_p9k__h::=40.}+}${${_p9k__d::=$((_p9k__m-_p9k__h))}+}${_p9k__lprompt/\\%\\{d\\%\\}*\\%\\{d\\%\\}/${_p9k__1ldir-${:-"%B%F{255}"}${(Q)${:-"\\\\~"}}${:-"%b%K{030}%F{254}"}/${${${_p9k__d:#-*}:+scripts}:-${:-"%F{250}"}s${:-"%b%K{030}%F{254}"}${$((_p9k__d+=6))+}}/${${${_p9k__d:#-*}:+envoi '
 'forest}:-${:-"%F{250}"}e${:-"%b%K{030}%F{254}"}${$((_p9k__d+=11))+}}/${:-"%B%F{255}"}django${:-"%b%K{030}%F{254}"}}}${${_p9k__m::=$((_p9k__d+_p9k__h))}+}}${${COLUMNS::=$_p9k__clm}+}')

PWD 	

'/home/eduba/scripts/envoi forest/django/siteweb'

QT_AUTO_SCREEN_SCALE_FACTOR 	

'1'

QT_IM_MODULE 	

'ibus'

QT_QPA_PLATFORMTHEME 	

'qt5ct'

QUERY_STRING 	

'code=54DSdtk8Po4TabRHgxW_qyW7tYRIEt4uasLmbW6YIJif2xR30LSljel9p4Sn5lRN&state=%7B%22renderingId%22%3A+124844%7D'

REMOTE_ADDR 	

'127.0.0.1'

REMOTE_HOST 	

''

REQUEST_METHOD 	

'GET'

RUN_MAIN 	

'true'

SCRIPT_NAME 	

''

SERVER_NAME 	

'localhost'

SERVER_PORT 	

'8000'

SERVER_PROTOCOL 	

'HTTP/1.1'

SERVER_SOFTWARE 	

'WSGIServer/0.2'

SESSION_MANAGER 	

'local/stellaris:@/tmp/.ICE-unix/1503,unix/stellaris:/tmp/.ICE-unix/1503'

SHELL 	

'/bin/zsh'

SHLVL 	

'1'

SSH_AUTH_SOCK 	

'/run/user/1000/keyring/ssh'

SYSTEMD_EXEC_PID 	

'1503'

TERM 	

'xterm-256color'

TZ 	

'UTC'

USER 	

'eduba'

USERNAME 	

'eduba'

VIRTUAL_ENV 	

'/home/eduba/scripts/envoi forest/django/venv'

VTE_VERSION 	

'6602'

WINDOWPATH 	

'2'

XAUTHORITY 	

'/run/user/1000/gdm/Xauthority'

XDG_CURRENT_DESKTOP 	

'GNOME'

XDG_DATA_DIRS 	

'/home/eduba/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'

XDG_MENU_PREFIX 	

'gnome-'

XDG_RUNTIME_DIR 	

'/run/user/1000'

XDG_SESSION_CLASS 	

'user'

XDG_SESSION_DESKTOP 	

'gnome'

XDG_SESSION_TYPE 	

'x11'

XMODIFIERS 	

'@im=ibus'

_ 	

'/home/eduba/scripts/envoi forest/django/venv/bin/python'

_P9K_TTY 	

'/dev/pts/0'

wsgi.errors 	

<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>

wsgi.file_wrapper 	

<class 'wsgiref.util.FileWrapper'>

wsgi.input 	

<django.core.handlers.wsgi.LimitedStream object at 0x7f8df5a789a0>

wsgi.multiprocess 	

False

wsgi.multithread 	

True

wsgi.run_once 	

False

wsgi.url_scheme 	

'http'

wsgi.version 	

(1, 0)

Settings
Using settings module siteweb.settings
Setting 	Value
ABSOLUTE_URL_OVERRIDES 	

{}

ADMINS 	

[]

ALLOWED_HOSTS 	

['*']

APPEND_SLASH 	

False

AUTHENTICATION_BACKENDS 	

['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS 	

'********************'

AUTH_USER_MODEL 	

'auth.User'

BASE_DIR 	

PosixPath('/home/eduba/scripts/envoi forest/django/siteweb')

CACHES 	

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

CACHE_MIDDLEWARE_ALIAS 	

'default'

CACHE_MIDDLEWARE_KEY_PREFIX 	

'********************'

CACHE_MIDDLEWARE_SECONDS 	

600

CORS_ALLOWED_ORIGIN_REGEXES 	

['.*\\.forestadmin\\.com.*']

CORS_ALLOW_CREDENTIALS 	

True

CORS_ALLOW_HEADERS 	

['accept',
 'accept-encoding',
 'authorization',
 'content-type',
 'dnt',
 'origin',
 'user-agent',
 'x-csrftoken',
 'x-requested-with',
 'forest-context-url']

CORS_ORIGIN_ALLOW_ALL 	

True

CSRF_COOKIE_AGE 	

31449600

CSRF_COOKIE_DOMAIN 	

None

CSRF_COOKIE_HTTPONLY 	

False

CSRF_COOKIE_NAME 	

'csrftoken'

CSRF_COOKIE_PATH 	

'/'

CSRF_COOKIE_SAMESITE 	

'Lax'

CSRF_COOKIE_SECURE 	

False

CSRF_FAILURE_VIEW 	

'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME 	

'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS 	

[]

CSRF_USE_SESSIONS 	

False

DATABASES 	

{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.sqlite3',
             'HOST': '',
             'NAME': PosixPath('/home/eduba/scripts/envoi forest/django/siteweb/db.sqlite3'),
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIGRATE': True,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': ''}}

DATABASE_ROUTERS 	

[]

DATA_UPLOAD_MAX_MEMORY_SIZE 	

2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS 	

1000

DATETIME_FORMAT 	

'N j, Y, P'

DATETIME_INPUT_FORMATS 	

['%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M']

DATE_FORMAT 	

'N j, Y'

DATE_INPUT_FORMATS 	

['%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y']

DEBUG 	

True

DEBUG_PROPAGATE_EXCEPTIONS 	

False

DECIMAL_SEPARATOR 	

'.'

DEFAULT_AUTO_FIELD 	

'django.db.models.BigAutoField'

DEFAULT_CHARSET 	

'utf-8'

DEFAULT_EXCEPTION_REPORTER 	

'django.views.debug.ExceptionReporter'

DEFAULT_EXCEPTION_REPORTER_FILTER 	

'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE 	

'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL 	

'webmaster@localhost'

DEFAULT_INDEX_TABLESPACE 	

''

DEFAULT_TABLESPACE 	

''

DISALLOWED_USER_AGENTS 	

[]

EMAIL_BACKEND 	

'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST 	

'localhost'

EMAIL_HOST_PASSWORD 	

'********************'

EMAIL_HOST_USER 	

''

EMAIL_PORT 	

25

EMAIL_SSL_CERTFILE 	

None

EMAIL_SSL_KEYFILE 	

'********************'

EMAIL_SUBJECT_PREFIX 	

'[Django] '

EMAIL_TIMEOUT 	

None

EMAIL_USE_LOCALTIME 	

False

EMAIL_USE_SSL 	

False

EMAIL_USE_TLS 	

False

FILE_UPLOAD_DIRECTORY_PERMISSIONS 	

None

FILE_UPLOAD_HANDLERS 	

['django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE 	

2621440

FILE_UPLOAD_PERMISSIONS 	

420

FILE_UPLOAD_TEMP_DIR 	

None

FIRST_DAY_OF_WEEK 	

0

FIXTURE_DIRS 	

[]

FORCE_SCRIPT_NAME 	

None

FOREST 	

{'APPLICATION_URL': 'http://localhost:8000',
 'FOREST_AUTH_SECRET': '********************',
 'FOREST_ENV_SECRET': '********************',
 'FOREST_URL': 'https://api.forestadmin.com'}

FORMAT_MODULE_PATH 	

None

FORM_RENDERER 	

'django.forms.renderers.DjangoTemplates'

IGNORABLE_404_URLS 	

[]

INSTALLED_APPS 	

['django_forest',
 'django.contrib.admin',
 'corsheaders',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']

INTERNAL_IPS 	

[]

LANGUAGES 	

[('af', 'Afrikaans'),
 ('ar', 'Arabic'),
 ('ar-dz', 'Algerian Arabic'),
 ('ast', 'Asturian'),
 ('az', 'Azerbaijani'),
 ('bg', 'Bulgarian'),
 ('be', 'Belarusian'),
 ('bn', 'Bengali'),
 ('br', 'Breton'),
 ('bs', 'Bosnian'),
 ('ca', 'Catalan'),
 ('cs', 'Czech'),
 ('cy', 'Welsh'),
 ('da', 'Danish'),
 ('de', 'German'),
 ('dsb', 'Lower Sorbian'),
 ('el', 'Greek'),
 ('en', 'English'),
 ('en-au', 'Australian English'),
 ('en-gb', 'British English'),
 ('eo', 'Esperanto'),
 ('es', 'Spanish'),
 ('es-ar', 'Argentinian Spanish'),
 ('es-co', 'Colombian Spanish'),
 ('es-mx', 'Mexican Spanish'),
 ('es-ni', 'Nicaraguan Spanish'),
 ('es-ve', 'Venezuelan Spanish'),
 ('et', 'Estonian'),
 ('eu', 'Basque'),
 ('fa', 'Persian'),
 ('fi', 'Finnish'),
 ('fr', 'French'),
 ('fy', 'Frisian'),
 ('ga', 'Irish'),
 ('gd', 'Scottish Gaelic'),
 ('gl', 'Galician'),
 ('he', 'Hebrew'),
 ('hi', 'Hindi'),
 ('hr', 'Croatian'),
 ('hsb', 'Upper Sorbian'),
 ('hu', 'Hungarian'),
 ('hy', 'Armenian'),
 ('ia', 'Interlingua'),
 ('id', 'Indonesian'),
 ('ig', 'Igbo'),
 ('io', 'Ido'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('kab', 'Kabyle'),
 ('kk', 'Kazakh'),
 ('km', 'Khmer'),
 ('kn', 'Kannada'),
 ('ko', 'Korean'),
 ('ky', 'Kyrgyz'),
 ('lb', 'Luxembourgish'),
 ('lt', 'Lithuanian'),
 ('lv', 'Latvian'),
 ('mk', 'Macedonian'),
 ('ml', 'Malayalam'),
 ('mn', 'Mongolian'),
 ('mr', 'Marathi'),
 ('ms', 'Malay'),
 ('my', 'Burmese'),
 ('nb', 'Norwegian Bokmål'),
 ('ne', 'Nepali'),
 ('nl', 'Dutch'),
 ('nn', 'Norwegian Nynorsk'),
 ('os', 'Ossetic'),
 ('pa', 'Punjabi'),
 ('pl', 'Polish'),
 ('pt', 'Portuguese'),
 ('pt-br', 'Brazilian Portuguese'),
 ('ro', 'Romanian'),
 ('ru', 'Russian'),
 ('sk', 'Slovak'),
 ('sl', 'Slovenian'),
 ('sq', 'Albanian'),
 ('sr', 'Serbian'),
 ('sr-latn', 'Serbian Latin'),
 ('sv', 'Swedish'),
 ('sw', 'Swahili'),
 ('ta', 'Tamil'),
 ('te', 'Telugu'),
 ('tg', 'Tajik'),
 ('th', 'Thai'),
 ('tk', 'Turkmen'),
 ('tr', 'Turkish'),
 ('tt', 'Tatar'),
 ('udm', 'Udmurt'),
 ('uk', 'Ukrainian'),
 ('ur', 'Urdu'),
 ('uz', 'Uzbek'),
 ('vi', 'Vietnamese'),
 ('zh-hans', 'Simplified Chinese'),
 ('zh-hant', 'Traditional Chinese')]

LANGUAGES_BIDI 	

['he', 'ar', 'ar-dz', 'fa', 'ur']

LANGUAGE_CODE 	

'en-us'

LANGUAGE_COOKIE_AGE 	

None

LANGUAGE_COOKIE_DOMAIN 	

None

LANGUAGE_COOKIE_HTTPONLY 	

False

LANGUAGE_COOKIE_NAME 	

'django_language'

LANGUAGE_COOKIE_PATH 	

'/'

LANGUAGE_COOKIE_SAMESITE 	

None

LANGUAGE_COOKIE_SECURE 	

False

LOCALE_PATHS 	

[]

LOGGING 	

{}

LOGGING_CONFIG 	

'logging.config.dictConfig'

LOGIN_REDIRECT_URL 	

'/accounts/profile/'

LOGIN_URL 	

'/accounts/login/'

LOGOUT_REDIRECT_URL 	

None

MANAGERS 	

[]

MEDIA_ROOT 	

''

MEDIA_URL 	

'/'

MESSAGE_STORAGE 	

'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE 	

['django_forest.middleware.IpWhitelistMiddleware',
 'django_forest.middleware.PermissionMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'corsheaders.middleware.CorsPostCsrfMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']

MIGRATION_MODULES 	

{}

MONTH_DAY_FORMAT 	

'F j'

NUMBER_GROUPING 	

0

PASSWORD_HASHERS 	

'********************'

PASSWORD_RESET_TIMEOUT 	

'********************'

PREPEND_WWW 	

False

ROOT_URLCONF 	

'siteweb.urls'

SECRET_KEY 	

'********************'

SECURE_CONTENT_TYPE_NOSNIFF 	

True

SECURE_CROSS_ORIGIN_OPENER_POLICY 	

'same-origin'

SECURE_HSTS_INCLUDE_SUBDOMAINS 	

False

SECURE_HSTS_PRELOAD 	

False

SECURE_HSTS_SECONDS 	

0

SECURE_PROXY_SSL_HEADER 	

None

SECURE_REDIRECT_EXEMPT 	

[]

SECURE_REFERRER_POLICY 	

'same-origin'

SECURE_SSL_HOST 	

None

SECURE_SSL_REDIRECT 	

False

SERVER_EMAIL 	

'root@localhost'

SESSION_CACHE_ALIAS 	

'default'

SESSION_COOKIE_AGE 	

1209600

SESSION_COOKIE_DOMAIN 	

None

SESSION_COOKIE_HTTPONLY 	

True

SESSION_COOKIE_NAME 	

'sessionid'

SESSION_COOKIE_PATH 	

'/'

SESSION_COOKIE_SAMESITE 	

'Lax'

SESSION_COOKIE_SECURE 	

False

SESSION_ENGINE 	

'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE 	

False

SESSION_FILE_PATH 	

None

SESSION_SAVE_EVERY_REQUEST 	

False

SESSION_SERIALIZER 	

'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE 	

'siteweb.settings'

SHORT_DATETIME_FORMAT 	

'm/d/Y P'

SHORT_DATE_FORMAT 	

'm/d/Y'

SIGNING_BACKEND 	

'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS 	

[]

STATICFILES_DIRS 	

[]

STATICFILES_FINDERS 	

['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE 	

'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT 	

None

STATIC_URL 	

'/static/'

TEMPLATES 	

[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': [],
  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages']}}]

TEST_NON_SERIALIZED_APPS 	

[]

TEST_RUNNER 	

'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR 	

','

TIME_FORMAT 	

'P'

TIME_INPUT_FORMATS 	

['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE 	

'UTC'

USE_DEPRECATED_PYTZ 	

False

USE_I18N 	

True

USE_L10N 	

True

USE_THOUSAND_SEPARATOR 	

False

USE_TZ 	

True

USE_X_FORWARDED_HOST 	

False

USE_X_FORWARDED_PORT 	

False

WSGI_APPLICATION 	

'siteweb.wsgi.application'

X_FRAME_OPTIONS 	

'DENY'

YEAR_MONTH_FORMAT 	

'F Y'

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

hi @MikaelMonjour,

I need more data to investigate.
Could you enable the debug log on your Django project and copy/past me the log for the Oic layer.
You should have a log that begin by “New oic client registration success”

Could you copy/paste me the request sent by the front too (url and body response).
You should have three requests:

  1. http://localhost:8000/forest/authentication
  2. https://api.forestadmin.com/oidc/auth?xxxx
  3. http://localhost:8000/forest/authentication/callback?xxxx

Thank’s

Hy valentin,

Here is my debug log (i did a paste because it is very long)
https://0bin.net/paste/e2t0Fcmp#e3FieI8mruJPnfb34kqi0YyEa8-LIgIwqxT+YA3iAsn

Response in terminal

System check identified no issues (0 silenced).
April 14, 2022 - 10:59:53
Django version 4.0.4, using settings 'siteweb.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
"POST /forest/authentication HTTP/1.1" 200 1123
"OPTIONS /forest/authentication/callback?code=5NQXvU7AzgENrOiEsb0BZ7Uybl5QLh2foHKSHybB5Y49szA_MrnLY817QryrdLqA&state=%7B%22renderingId%22%3A+124844%7D HTTP/1.1" 200 0
/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'api.forestadmin.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
Internal Server Error: /forest/authentication/callback
Traceback (most recent call last):
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 84, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 119, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/utils.py", line 21, in wrapper
    return f(*args, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py", line 144, in get
    token_body = self._verify_code_and_generate_token_body(callback_url, request)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py", line 126, in _verify_code_and_generate_token_body
    user = self._authenticate(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py", line 85, in _authenticate
    access_token_request = client.do_access_token_request(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oic/__init__.py", line 703, in do_access_token_request
    atr = super().do_access_token_request(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/__init__.py", line 919, in do_access_token_request
    return self.request_and_return(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/__init__.py", line 812, in request_and_return
    return self.parse_request_response(resp, response, body_type, state, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/__init__.py", line 753, in parse_request_response
    return self.parse_response(
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/__init__.py", line 675, in parse_response
    verf = resp.verify(**kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oic/message.py", line 356, in verify
    self["id_token"] = verify_id_token(self, **kwargs)
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oic/message.py", line 311, in verify_id_token
    if not idt.verify(**kwargs):
  File "/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oic/message.py", line 786, in verify
    raise IATError("Issued in the future")
oic.oic.message.IATError: Issued in the future
"GET /forest/authentication/callback?code=5NQXvU7AzgENrOiEsb0BZ7Uybl5QLh2foHKSHybB5Y49szA_MrnLY817QryrdLqA&state=%7B%22renderingId%22%3A+124844%7D HTTP/1.1" 500 157558

Callback response & request headers

################################################################

RESPONSE HEADER

HTTP/1.1 500 Internal Server Error

Date: Thu, 14 Apr 2022 11:12:01 GMT

Server: WSGIServer/0.2 CPython/3.8.13

Content-Type: text/html

X-Frame-Options: DENY

Content-Length: 105442

Vary: Cookie, Origin

X-Content-Type-Options: nosniff

Referrer-Policy: same-origin

Cross-Origin-Opener-Policy: same-origin
########################################################################

REQUEST HEADER

GET /forest/authentication/callback?code=5NQXvU7AzgENrOiEsb0BZ7Uybl5QLh2foHKSHybB5Y49szA_MrnLY817QryrdLqA&state=%7B%22renderingId%22%3A+124844%7D HTTP/1.1

Host: localhost:8000

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8

Accept-Language: en-US,en;q=0.5

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

Cookie: username-localhost-8888="2|1:0|10:1649155905|23:username-localhost-8888|44:ZTJmNzE3ZWFlZjY4NDMwYTkzMjFjZmU4ZjQyNGNjOTQ=|63d67609a37814f9599a646d08163930d873c9a13ae4156a0d09e686298816f8"; _xsrf=2|d0f54973|d6aa927c9d071627f3cedfd310e944dc|1649155860

Upgrade-Insecure-Requests: 1

Sec-Fetch-Dest: document

Sec-Fetch-Mode: navigate

Sec-Fetch-Site: none

Sec-Fetch-User: ?1

Cache-Control: max-age=0

Authentication

Method Not Allowed (GET): /forest/authentication
Method Not Allowed: /forest/authentication
"GET /forest/authentication HTTP/1.1" 405 0
Not Found: /favicon.ico
"GET /favicon.ico HTTP/1.1" 404 2217


-> Response Headers


HTTP/1.1 405 Method Not Allowed
Date: Thu, 14 Apr 2022 11:02:34 GMT
Server: WSGIServer/0.2 CPython/3.8.13
Content-Type: text/html; charset=utf-8
Allow: POST, OPTIONS
X-Frame-Options: DENY
Content-Length: 0
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
Vary: Origin

-> Reponse request

GET /forest/authentication HTTP/1.1
Host: localhost:8000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: username-localhost-8888="2|1:0|10:1649155905|23:username-localhost-8888|44:ZTJmNzE3ZWFlZjY4NDMwYTkzMjFjZmU4ZjQyNGNjOTQ=|63d67609a37814f9599a646d08163930d873c9a13ae4156a0d09e686298816f8"; _xsrf=2|d0f54973|d6aa927c9d071627f3cedfd310e944dc|1649155860
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Sec-Fetch-User: ?1
Cache-Control: max-age=0

Sorry for the late response (my last one was considered as a spam)

Here is the log file: https://pastebin.com/35Zi7eZz

Auth Headers for
http://localhost:8000/forest/authentication

Method Not Allowed (GET): /forest/authentication
Method Not Allowed: /forest/authentication
"GET /forest/authentication HTTP/1.1" 405 0
Not Found: /favicon.ico
"GET /favicon.ico HTTP/1.1" 404 2217


-> Response Headers


HTTP/1.1 405 Method Not Allowed
Date: Thu, 14 Apr 2022 11:02:34 GMT
Server: WSGIServer/0.2 CPython/3.8.13
Content-Type: text/html; charset=utf-8
Allow: POST, OPTIONS
X-Frame-Options: DENY
Content-Length: 0
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Cross-Origin-Opener-Policy: same-origin
Vary: Origin

-> Reponse request

GET /forest/authentication HTTP/1.1
Host: localhost:8000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Cookie: username-localhost-8888="2|1:0|10:1649155905|23:username-localhost-8888|44:ZTJmNzE3ZWFlZjY4NDMwYTkzMjFjZmU4ZjQyNGNjOTQ=|63d67609a37814f9599a646d08163930d873c9a13ae4156a0d09e686298816f8"; _xsrf=2|d0f54973|d6aa927c9d071627f3cedfd310e944dc|1649155860
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: cross-site
Sec-Fetch-User: ?1
Cache-Control: max-age=0

Callback:

KeyError at /forest/authentication/callback

'access_token'

Request Method: 	GET
Request URL: 	http://localhost:8000/forest/authentication/callback?code=5NQXvU7AzgENrOiEsb0BZ7Uybl5QLh2foHKSHybB5Y49szA_MrnLY817QryrdLqA&state=%7B%22renderingId%22%3A+124844%7D
Django Version: 	4.0.4
Exception Type: 	KeyError
Exception Value: 	

'access_token'

Exception Location: 	/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/message.py, line 762, in __getitem__
Python Executable: 	/home/eduba/scripts/envoi forest/django/venv/bin/python
Python Version: 	3.8.13
Python Path: 	

['/home/eduba/scripts/envoi forest/django/siteweb',
 '/usr/lib/python38.zip',
 '/usr/lib/python3.8',
 '/usr/lib/python3.8/lib-dynload',
 '/home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages']

Server time: 	Thu, 14 Apr 2022 11:09:16 +0000
Traceback Switch to copy-and-paste view

    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/core/handlers/exception.py, line 55, in inner

                        response = get_response(request)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/core/handlers/base.py, line 197, in _get_response

                        response = wrapped_callback(request, *callback_args, **callback_kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/views/generic/base.py, line 84, in view

                    return self.dispatch(request, *args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django/views/generic/base.py, line 119, in dispatch

                return handler(request, *args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/utils.py, line 21, in wrapper

                    return f(*args, **kwargs)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py, line 144, in get

                token_body = self._verify_code_and_generate_token_body(callback_url, request)

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py, line 126, in _verify_code_and_generate_token_body

                user = self._authenticate(

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/django_forest/authentication/views/callback.py, line 96, in _authenticate

                headers = {'forest-token': access_token_request['access_token']}

         …
    Local vars
    /home/eduba/scripts/envoi forest/django/venv/lib/python3.8/site-packages/oic/oauth2/message.py, line 762, in __getitem__

                return self._dict[item]

         …
    Local vars

Request information
USER

AnonymousUser
GET
Variable 	Value
code 	

'5NQXvU7AzgENrOiEsb0BZ7Uybl5QLh2foHKSHybB5Y49szA_MrnLY817QryrdLqA'

state 	

'{"renderingId": 124844}'

POST

No POST data
FILES

No FILES data
COOKIES
Variable 	Value
username-localhost-8888 	

'2|1:0|10:1649155905|23:username-localhost-8888|44:ZTJmNzE3ZWFlZjY4NDMwYTkzMjFjZmU4ZjQyNGNjOTQ=|63d67609a37814f9599a646d08163930d873c9a13ae4156a0d09e686298816f8'

_xsrf 	

'2|d0f54973|d6aa927c9d071627f3cedfd310e944dc|1649155860'

META
Variable 	Value
COLORTERM 	

'truecolor'

CONTENT_LENGTH 	

''

CONTENT_TYPE 	

'text/plain'

CUDA_PATH 	

'/opt/cuda'

DBUS_SESSION_BUS_ADDRESS 	

'unix:path=/run/user/1000/bus,guid=30482760033a7710cbab94c36257fba2'

DBUS_STARTER_ADDRESS 	

'unix:path=/run/user/1000/bus,guid=30482760033a7710cbab94c36257fba2'

DBUS_STARTER_BUS_TYPE 	

'session'

DESKTOP_SESSION 	

'gnome'

DISPLAY 	

':1'

DJANGO_SETTINGS_MODULE 	

'siteweb.settings'

EDITOR 	

'/usr/bin/nano'

GATEWAY_INTERFACE 	

'CGI/1.1'

GDMSESSION 	

'gnome'

GDM_LANG 	

'fr_FR.UTF-8'

GNOME_TERMINAL_SCREEN 	

'/org/gnome/Terminal/screen/e77dd73b_c63f_49ff_b308_6f03faf0498d'

GNOME_TERMINAL_SERVICE 	

':1.84'

GTK3_MODULES 	

'xapp-gtk3-module'

HOME 	

'/home/eduba'

HTTP_ACCEPT 	

'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8'

HTTP_ACCEPT_ENCODING 	

'gzip, deflate, br'

HTTP_ACCEPT_LANGUAGE 	

'en-US,en;q=0.5'

HTTP_CONNECTION 	

'keep-alive'

HTTP_COOKIE 	

('username-localhost-8888="2|1:0|10:1649155905|23:username-localhost-8888|44:ZTJmNzE3ZWFlZjY4NDMwYTkzMjFjZmU4ZjQyNGNjOTQ=|63d67609a37814f9599a646d08163930d873c9a13ae4156a0d09e686298816f8"; '
 '_xsrf=2|d0f54973|d6aa927c9d071627f3cedfd310e944dc|1649155860')

HTTP_HOST 	

'localhost:8000'

HTTP_SEC_FETCH_DEST 	

'document'

HTTP_SEC_FETCH_MODE 	

'navigate'

HTTP_SEC_FETCH_SITE 	

'none'

HTTP_SEC_FETCH_USER 	

'?1'

HTTP_UPGRADE_INSECURE_REQUESTS 	

'1'

HTTP_USER_AGENT 	

'Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0'

INSIDE_NAUTILUS_PYTHON 	

''

LANG 	

'fr_FR.UTF-8'

LC_ADDRESS 	

'fr_FR.UTF-8'

LC_IDENTIFICATION 	

'fr_FR.UTF-8'

LC_MEASUREMENT 	

'fr_FR.UTF-8'

LC_MONETARY 	

'fr_FR.UTF-8'

LC_NAME 	

'fr_FR.UTF-8'

LC_NUMERIC 	

'fr_FR.UTF-8'

LC_PAPER 	

'fr_FR.UTF-8'

LC_TELEPHONE 	

'fr_FR.UTF-8'

LC_TIME 	

'fr_FR.UTF-8'

LESS 	

'-R'

LESS_TERMCAP_mb 	

'\x1b[01;32m'

LESS_TERMCAP_md 	

'\x1b[01;32m'

LESS_TERMCAP_me 	

'\x1b[0m'

LESS_TERMCAP_se 	

'\x1b[0m'

LESS_TERMCAP_so 	

'\x1b[01;47;34m'

LESS_TERMCAP_ue 	

'\x1b[0m'

LESS_TERMCAP_us 	

'\x1b[01;36m'

LOGNAME 	

'eduba'

LS_COLORS 	

'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'

LS_OPTIONS 	

'--color=auto'

MAIL 	

'/var/spool/mail/eduba'

MOTD_SHOWN 	

'pam'

MOZ_ENABLE_WAYLAND 	

'1'

OLDPWD 	

'/home/eduba/scripts/envoi forest/django'

P9K_SSH 	

'0'

P9K_TTY 	

'old'

PATH 	

('/home/eduba/scripts/envoi '
 'forest/django/venv/bin:/home/eduba/.local/bin:/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin:/usr/local/sbin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl')

PATH_INFO 	

'/forest/authentication/callback'

PKGFILE_PROMPT_INSTALL_MISSING 	

'1'

PS1 	

('(venv) '
 '${$((_p9k_on_expand()))+}%{${_p9k__raw_msg-}${_p9k__raw_msg::=}%}${(e)_p9k_t[7]}${_p9k__1-${${:-${_p9k__d::=0}${_p9k__rprompt::=${_p9k__1r-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=}}+}${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=8}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+10}}${_p9k__n:=11}${_p9k__v::="✔"}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rstatus+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{002\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{002\\} '
 '%b%K{000\\}%F{002\\}}${_p9k__sss::=%b%K{000\\}%F{002\\} '
 '}${_p9k__i::=1}${_p9k__bg::=000}}+}}${${:-"${${(%):-%j}:#0}"}:+${${:-${P9K_CONTENT::=""}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=12}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+14}}${_p9k__n:=15}${_p9k__v::=\uf013}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rbackground_jobs+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{006\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{006\\} '
 '%b%K{000\\}%F{006\\}}${_p9k__sss::=%b%K{000\\}%F{006\\} '
 '}${_p9k__i::=3}${_p9k__bg::=000}}+}}}${${:-"$DIRENV_DIR"}:+${${:-${P9K_CONTENT::=}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=16}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+18}}${_p9k__n:=19}${_p9k__v::=▼}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rdirenv+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{003\\}${${(M)_p9k__e:#11}:+ '
 '}$_p9k__v${${:-${_p9k__w::=%b%K{000\\}%F{003\\} '
 '%b%K{000\\}%F{003\\}}${_p9k__sss::=%b%K{000\\}%F{003\\} '
 '}${_p9k__i::=4}${_p9k__bg::=000}}+}}}${${:-"${${(%):-%#}:#\\#}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=20}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+22}}${_p9k__n:=23}${_p9k__c::=}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{003\\}${${:-${_p9k__w::=%b%K{000\\}%F{003\\} '
 '%b%K{000\\}%F{003\\}}${_p9k__sss::=%b%K{000\\}%F{003\\} '
 '}${_p9k__i::=30}${_p9k__bg::=000}}+}}}${${:-"${${(%):-%#}:#\\%}"}:+${${:-${P9K_CONTENT::=%n@%m}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=24}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(000|000)}:+26}}${_p9k__n:=27}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rcontext+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{000\\}%F{001\\}${${:-${_p9k__w::=%b%K{000\\}%F{001\\} '
 '%b%K{000\\}%F{001\\}}${_p9k__sss::=%b%K{000\\}%F{001\\} '
 '}${_p9k__i::=30}${_p9k__bg::=000}}+}}}${${:-"${${:-$_p9k__keymap.$_p9k__zle_state}:#(vicmd.*|vivis.*|vivli.*|*.*insert*)}"}:+${${:-${P9K_CONTENT::=OVERTYPE}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=28}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(003|003)}:+30}}${_p9k__n:=31}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{003\\}%F{000\\}${${:-${_p9k__w::=%b%K{003\\}%F{000\\} '
 '%b%K{003\\}%F{000\\}}${_p9k__sss::=%b%K{003\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=003}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#vicmd0}"}:+${${:-${P9K_CONTENT::=NORMAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=32}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(002|002)}:+34}}${_p9k__n:=35}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{002\\}%F{000\\}${${:-${_p9k__w::=%b%K{002\\}%F{000\\} '
 '%b%K{002\\}%F{000\\}}${_p9k__sss::=%b%K{002\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=002}}+}}}${${:-"${(M)${:-$_p9k__keymap$_p9k__region_active}:#(vicmd1|vivis?|vivli?)}"}:+${${:-${P9K_CONTENT::=VISUAL}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=36}}${_p9k__n:=${${(M)${:-x$_p9k__bg}:#x(004|004)}:+38}}${_p9k__n:=39}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1rvi_mode+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${_p9k_t[$_p9k__n]/<_p9k__w>/$_p9k__w}${_p9k__c}%b%K{004\\}%F{000\\}${${:-${_p9k__w::=%b%K{004\\}%F{000\\} '
 '%b%K{004\\}%F{000\\}}${_p9k__sss::=%b%K{004\\}%F{000\\} '
 '}${_p9k__i::=38}${_p9k__bg::=004}}+}}}$_p9k__sss%b%k%f}}${_p9k__lprompt::=${_p9k__1l-${${:-${_p9k__bg::=NONE}${_p9k__i::=0}${_p9k__sss::=%f}}+}${${:-${P9K_CONTENT::=\uf312}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=40}}${_p9k__n:=${${(M)${:-x007}:#x($_p9k__bg|${_p9k__bg:-0})}:+42}}${_p9k__n:=43}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1los_icon+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}0}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__c}%b%K{007\\}%F{030\\} '
 '${${:-${_p9k__s::=%F{007\\}\ue0b0}${_p9k__ss::=\ue0b1}${_p9k__sss::=%F{007\\}\ue0b0}${_p9k__i::=1}${_p9k__bg::=007}}+}}${${:-${P9K_CONTENT::="%{d%}${:-"%B%F{255}"}${(Q)${:-"\\\\~"}}${:-"%b%K{030}%F{254}"}/${${${_p9k__d:#-*}:+scripts}:-${:-"%F{250}"}s${:-"%b%K{030}%F{254}"}${$((_p9k__d+=6))+}}/${${${_p9k__d:#-*}:+envoi '
 'forest}:-${:-"%F{250}"}e${:-"%b%K{030}%F{254}"}${$((_p9k__d+=11))+}}/${:-"%B%F{255}"}django${:-"%b%K{030}%F{254}"}%{d%}"}${_p9k__n::=}${${${_p9k__bg:-0}:#NONE}:-${_p9k__n::=88}}${_p9k__n:=${${(M)${:-x030}:#x($_p9k__bg|${_p9k__bg:-0})}:+90}}${_p9k__n:=91}${_p9k__v::=\uf07c}${_p9k__c::="${P9K_CONTENT}"}${_p9k__c::=${_p9k__c//\r'
 '}}${_p9k__e::=${${_p9k__1ldir+00}:-${${(%):-$_p9k__c%1(l.1.0)}[-1]}1}}}+}${${_p9k__e:#00}:+${${_p9k_t[$_p9k__n]/<_p9k__ss>/$_p9k__ss}/<_p9k__s>/$_p9k__s}${_p9k__v}${${(M)_p9k__e:#11}:+ '
 '}${_p9k__c}%b%K{030\\}%F{254\\} '
 '${${:-${_p9k__s::=%F{030\\}\ue0b0}${_p9k__ss::=\ue0b1}${_p9k__sss::=%F{030\\}\ue0b0}${_p9k__i::=2}${_p9k__bg::=030}}+}}${(e)_p9k__vcs}%b%k$_p9k__sss%b%k%f${:-" '
 '%b%k%f"}}}}+}${(e)_p9k_t[6]}${${_p9k__h::=40.}+}${${_p9k__d::=$((_p9k__m-_p9k__h))}+}${_p9k__lprompt/\\%\\{d\\%\\}*\\%\\{d\\%\\}/${_p9k__1ldir-${:-"%B%F{255}"}${(Q)${:-"\\\\~"}}${:-"%b%K{030}%F{254}"}/${${${_p9k__d:#-*}:+scripts}:-${:-"%F{250}"}s${:-"%b%K{030}%F{254}"}${$((_p9k__d+=6))+}}/${${${_p9k__d:#-*}:+envoi '
 'forest}:-${:-"%F{250}"}e${:-"%b%K{030}%F{254}"}${$((_p9k__d+=11))+}}/${:-"%B%F{255}"}django${:-"%b%K{030}%F{254}"}}}${${_p9k__m::=$((_p9k__d+_p9k__h))}+}}${${COLUMNS::=$_p9k__clm}+}')

PWD 	

'/home/eduba/scripts/envoi forest/django/siteweb'

QT_AUTO_SCREEN_SCALE_FACTOR 	

'1'

QT_IM_MODULE 	

'ibus'

QT_QPA_PLATFORMTHEME 	

'qt5ct'

QUERY_STRING 	

'code=5NQXvU7AzgENrOiEsb0BZ7Uybl5QLh2foHKSHybB5Y49szA_MrnLY817QryrdLqA&state=%7B%22renderingId%22%3A+124844%7D'

REMOTE_ADDR 	

'127.0.0.1'

REMOTE_HOST 	

''

REQUEST_METHOD 	

'GET'

RUN_MAIN 	

'true'

SCRIPT_NAME 	

''

SERVER_NAME 	

'localhost'

SERVER_PORT 	

'8000'

SERVER_PROTOCOL 	

'HTTP/1.1'

SERVER_SOFTWARE 	

'WSGIServer/0.2'

SESSION_MANAGER 	

'local/stellaris:@/tmp/.ICE-unix/1487,unix/stellaris:/tmp/.ICE-unix/1487'

SHELL 	

'/bin/zsh'

SHLVL 	

'1'

SSH_AUTH_SOCK 	

'/run/user/1000/keyring/ssh'

SYSTEMD_EXEC_PID 	

'1487'

TERM 	

'xterm-256color'

TZ 	

'UTC'

USER 	

'eduba'

USERNAME 	

'eduba'

VIRTUAL_ENV 	

'/home/eduba/scripts/envoi forest/django/venv'

VTE_VERSION 	

'6602'

WINDOWPATH 	

'2'

XAUTHORITY 	

'/run/user/1000/gdm/Xauthority'

XDG_CURRENT_DESKTOP 	

'GNOME'

XDG_DATA_DIRS 	

'/home/eduba/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'

XDG_MENU_PREFIX 	

'gnome-'

XDG_RUNTIME_DIR 	

'/run/user/1000'

XDG_SESSION_CLASS 	

'user'

XDG_SESSION_DESKTOP 	

'gnome'

XDG_SESSION_TYPE 	

'x11'

XMODIFIERS 	

'@im=ibus'

_ 	

'/home/eduba/scripts/envoi forest/django/venv/bin/python'

_P9K_TTY 	

'/dev/pts/1'

wsgi.errors 	

<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>

wsgi.file_wrapper 	

<class 'wsgiref.util.FileWrapper'>

wsgi.input 	

<django.core.handlers.wsgi.LimitedStream object at 0x7f28769d4490>

wsgi.multiprocess 	

False

wsgi.multithread 	

True

wsgi.run_once 	

False

wsgi.url_scheme 	

'http'

wsgi.version 	

(1, 0)

Settings
Using settings module siteweb.settings
Setting 	Value
ABSOLUTE_URL_OVERRIDES 	

{}

ADMINS 	

[]

ALLOWED_HOSTS 	

['*']

APPEND_SLASH 	

False

AUTHENTICATION_BACKENDS 	

['django.contrib.auth.backends.ModelBackend']

AUTH_PASSWORD_VALIDATORS 	

'********************'

AUTH_USER_MODEL 	

'auth.User'

BASE_DIR 	

PosixPath('/home/eduba/scripts/envoi forest/django/siteweb')

CACHES 	

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

CACHE_MIDDLEWARE_ALIAS 	

'default'

CACHE_MIDDLEWARE_KEY_PREFIX 	

'********************'

CACHE_MIDDLEWARE_SECONDS 	

600

CORS_ALLOWED_ORIGIN_REGEXES 	

['.*\\.forestadmin\\.com.*']

CORS_ALLOW_CREDENTIALS 	

True

CORS_ALLOW_HEADERS 	

['accept',
 'accept-encoding',
 'authorization',
 'content-type',
 'dnt',
 'origin',
 'user-agent',
 'x-csrftoken',
 'x-requested-with',
 'forest-context-url']

CORS_ORIGIN_ALLOW_ALL 	

True

CSRF_COOKIE_AGE 	

31449600

CSRF_COOKIE_DOMAIN 	

None

CSRF_COOKIE_HTTPONLY 	

False

CSRF_COOKIE_NAME 	

'csrftoken'

CSRF_COOKIE_PATH 	

'/'

CSRF_COOKIE_SAMESITE 	

'Lax'

CSRF_COOKIE_SECURE 	

False

CSRF_FAILURE_VIEW 	

'django.views.csrf.csrf_failure'

CSRF_HEADER_NAME 	

'HTTP_X_CSRFTOKEN'

CSRF_TRUSTED_ORIGINS 	

[]

CSRF_USE_SESSIONS 	

False

DATABASES 	

{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.sqlite3',
             'HOST': '',
             'NAME': PosixPath('/home/eduba/scripts/envoi forest/django/siteweb/db.sqlite3'),
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIGRATE': True,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': ''}}

DATABASE_ROUTERS 	

[]

DATA_UPLOAD_MAX_MEMORY_SIZE 	

2621440

DATA_UPLOAD_MAX_NUMBER_FIELDS 	

1000

DATETIME_FORMAT 	

'N j, Y, P'

DATETIME_INPUT_FORMATS 	

['%Y-%m-%d %H:%M:%S',
 '%Y-%m-%d %H:%M:%S.%f',
 '%Y-%m-%d %H:%M',
 '%m/%d/%Y %H:%M:%S',
 '%m/%d/%Y %H:%M:%S.%f',
 '%m/%d/%Y %H:%M',
 '%m/%d/%y %H:%M:%S',
 '%m/%d/%y %H:%M:%S.%f',
 '%m/%d/%y %H:%M']

DATE_FORMAT 	

'N j, Y'

DATE_INPUT_FORMATS 	

['%Y-%m-%d',
 '%m/%d/%Y',
 '%m/%d/%y',
 '%b %d %Y',
 '%b %d, %Y',
 '%d %b %Y',
 '%d %b, %Y',
 '%B %d %Y',
 '%B %d, %Y',
 '%d %B %Y',
 '%d %B, %Y']

DEBUG 	

True

DEBUG_PROPAGATE_EXCEPTIONS 	

False

DECIMAL_SEPARATOR 	

'.'

DEFAULT_AUTO_FIELD 	

'django.db.models.BigAutoField'

DEFAULT_CHARSET 	

'utf-8'

DEFAULT_EXCEPTION_REPORTER 	

'django.views.debug.ExceptionReporter'

DEFAULT_EXCEPTION_REPORTER_FILTER 	

'django.views.debug.SafeExceptionReporterFilter'

DEFAULT_FILE_STORAGE 	

'django.core.files.storage.FileSystemStorage'

DEFAULT_FROM_EMAIL 	

'webmaster@localhost'

DEFAULT_INDEX_TABLESPACE 	

''

DEFAULT_TABLESPACE 	

''

DISALLOWED_USER_AGENTS 	

[]

EMAIL_BACKEND 	

'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST 	

'localhost'

EMAIL_HOST_PASSWORD 	

'********************'

EMAIL_HOST_USER 	

''

EMAIL_PORT 	

25

EMAIL_SSL_CERTFILE 	

None

EMAIL_SSL_KEYFILE 	

'********************'

EMAIL_SUBJECT_PREFIX 	

'[Django] '

EMAIL_TIMEOUT 	

None

EMAIL_USE_LOCALTIME 	

False

EMAIL_USE_SSL 	

False

EMAIL_USE_TLS 	

False

FILE_UPLOAD_DIRECTORY_PERMISSIONS 	

None

FILE_UPLOAD_HANDLERS 	

['django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler']

FILE_UPLOAD_MAX_MEMORY_SIZE 	

2621440

FILE_UPLOAD_PERMISSIONS 	

420

FILE_UPLOAD_TEMP_DIR 	

None

FIRST_DAY_OF_WEEK 	

0

FIXTURE_DIRS 	

[]

FORCE_SCRIPT_NAME 	

None

FOREST 	

{'APPLICATION_URL': 'http://localhost:8000',
 'FOREST_AUTH_SECRET': '********************',
 'FOREST_ENV_SECRET': '********************',
 'FOREST_URL': 'https://api.forestadmin.com'}

FORMAT_MODULE_PATH 	

None

FORM_RENDERER 	

'django.forms.renderers.DjangoTemplates'

IGNORABLE_404_URLS 	

[]

INSTALLED_APPS 	

['django_forest',
 'django.contrib.admin',
 'corsheaders',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']

INTERNAL_IPS 	

[]

LANGUAGES 	

[('af', 'Afrikaans'),
 ('ar', 'Arabic'),
 ('ar-dz', 'Algerian Arabic'),
 ('ast', 'Asturian'),
 ('az', 'Azerbaijani'),
 ('bg', 'Bulgarian'),
 ('be', 'Belarusian'),
 ('bn', 'Bengali'),
 ('br', 'Breton'),
 ('bs', 'Bosnian'),
 ('ca', 'Catalan'),
 ('cs', 'Czech'),
 ('cy', 'Welsh'),
 ('da', 'Danish'),
 ('de', 'German'),
 ('dsb', 'Lower Sorbian'),
 ('el', 'Greek'),
 ('en', 'English'),
 ('en-au', 'Australian English'),
 ('en-gb', 'British English'),
 ('eo', 'Esperanto'),
 ('es', 'Spanish'),
 ('es-ar', 'Argentinian Spanish'),
 ('es-co', 'Colombian Spanish'),
 ('es-mx', 'Mexican Spanish'),
 ('es-ni', 'Nicaraguan Spanish'),
 ('es-ve', 'Venezuelan Spanish'),
 ('et', 'Estonian'),
 ('eu', 'Basque'),
 ('fa', 'Persian'),
 ('fi', 'Finnish'),
 ('fr', 'French'),
 ('fy', 'Frisian'),
 ('ga', 'Irish'),
 ('gd', 'Scottish Gaelic'),
 ('gl', 'Galician'),
 ('he', 'Hebrew'),
 ('hi', 'Hindi'),
 ('hr', 'Croatian'),
 ('hsb', 'Upper Sorbian'),
 ('hu', 'Hungarian'),
 ('hy', 'Armenian'),
 ('ia', 'Interlingua'),
 ('id', 'Indonesian'),
 ('ig', 'Igbo'),
 ('io', 'Ido'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('kab', 'Kabyle'),
 ('kk', 'Kazakh'),
 ('km', 'Khmer'),
 ('kn', 'Kannada'),
 ('ko', 'Korean'),
 ('ky', 'Kyrgyz'),
 ('lb', 'Luxembourgish'),
 ('lt', 'Lithuanian'),
 ('lv', 'Latvian'),
 ('mk', 'Macedonian'),
 ('ml', 'Malayalam'),
 ('mn', 'Mongolian'),
 ('mr', 'Marathi'),
 ('ms', 'Malay'),
 ('my', 'Burmese'),
 ('nb', 'Norwegian Bokmål'),
 ('ne', 'Nepali'),
 ('nl', 'Dutch'),
 ('nn', 'Norwegian Nynorsk'),
 ('os', 'Ossetic'),
 ('pa', 'Punjabi'),
 ('pl', 'Polish'),
 ('pt', 'Portuguese'),
 ('pt-br', 'Brazilian Portuguese'),
 ('ro', 'Romanian'),
 ('ru', 'Russian'),
 ('sk', 'Slovak'),
 ('sl', 'Slovenian'),
 ('sq', 'Albanian'),
 ('sr', 'Serbian'),
 ('sr-latn', 'Serbian Latin'),
 ('sv', 'Swedish'),
 ('sw', 'Swahili'),
 ('ta', 'Tamil'),
 ('te', 'Telugu'),
 ('tg', 'Tajik'),
 ('th', 'Thai'),
 ('tk', 'Turkmen'),
 ('tr', 'Turkish'),
 ('tt', 'Tatar'),
 ('udm', 'Udmurt'),
 ('uk', 'Ukrainian'),
 ('ur', 'Urdu'),
 ('uz', 'Uzbek'),
 ('vi', 'Vietnamese'),
 ('zh-hans', 'Simplified Chinese'),
 ('zh-hant', 'Traditional Chinese')]

LANGUAGES_BIDI 	

['he', 'ar', 'ar-dz', 'fa', 'ur']

LANGUAGE_CODE 	

'en-us'

LANGUAGE_COOKIE_AGE 	

None

LANGUAGE_COOKIE_DOMAIN 	

None

LANGUAGE_COOKIE_HTTPONLY 	

False

LANGUAGE_COOKIE_NAME 	

'django_language'

LANGUAGE_COOKIE_PATH 	

'/'

LANGUAGE_COOKIE_SAMESITE 	

None

LANGUAGE_COOKIE_SECURE 	

False

LOCALE_PATHS 	

[]

LOGGING 	

{'disable_existing_loggers': False,
 'handlers': {'console': {'class': 'logging.StreamHandler'}},
 'loggers': {'django': {'handlers': ['console'],
                        'level': 'INFO',
                        'propagate': False}},
 'root': {'handlers': ['console'], 'level': 'WARNING'},
 'version': 1}

LOGGING_CONFIG 	

'logging.config.dictConfig'

LOGIN_REDIRECT_URL 	

'/accounts/profile/'

LOGIN_URL 	

'/accounts/login/'

LOGOUT_REDIRECT_URL 	

None

MANAGERS 	

[]

MEDIA_ROOT 	

''

MEDIA_URL 	

'/'

MESSAGE_STORAGE 	

'django.contrib.messages.storage.fallback.FallbackStorage'

MIDDLEWARE 	

['django_forest.middleware.IpWhitelistMiddleware',
 'django_forest.middleware.PermissionMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'corsheaders.middleware.CorsPostCsrfMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']

MIGRATION_MODULES 	

{}

MONTH_DAY_FORMAT 	

'F j'

NUMBER_GROUPING 	

0

PASSWORD_HASHERS 	

'********************'

PASSWORD_RESET_TIMEOUT 	

'********************'

PREPEND_WWW 	

False

ROOT_URLCONF 	

'siteweb.urls'

SECRET_KEY 	

'********************'

SECURE_CONTENT_TYPE_NOSNIFF 	

True

SECURE_CROSS_ORIGIN_OPENER_POLICY 	

'same-origin'

SECURE_HSTS_INCLUDE_SUBDOMAINS 	

False

SECURE_HSTS_PRELOAD 	

False

SECURE_HSTS_SECONDS 	

0

SECURE_PROXY_SSL_HEADER 	

None

SECURE_REDIRECT_EXEMPT 	

[]

SECURE_REFERRER_POLICY 	

'same-origin'

SECURE_SSL_HOST 	

None

SECURE_SSL_REDIRECT 	

False

SERVER_EMAIL 	

'root@localhost'

SESSION_CACHE_ALIAS 	

'default'

SESSION_COOKIE_AGE 	

1209600

SESSION_COOKIE_DOMAIN 	

None

SESSION_COOKIE_HTTPONLY 	

True

SESSION_COOKIE_NAME 	

'sessionid'

SESSION_COOKIE_PATH 	

'/'

SESSION_COOKIE_SAMESITE 	

'Lax'

SESSION_COOKIE_SECURE 	

False

SESSION_ENGINE 	

'django.contrib.sessions.backends.db'

SESSION_EXPIRE_AT_BROWSER_CLOSE 	

False

SESSION_FILE_PATH 	

None

SESSION_SAVE_EVERY_REQUEST 	

False

SESSION_SERIALIZER 	

'django.contrib.sessions.serializers.JSONSerializer'

SETTINGS_MODULE 	

'siteweb.settings'

SHORT_DATETIME_FORMAT 	

'm/d/Y P'

SHORT_DATE_FORMAT 	

'm/d/Y'

SIGNING_BACKEND 	

'django.core.signing.TimestampSigner'

SILENCED_SYSTEM_CHECKS 	

[]

STATICFILES_DIRS 	

[]

STATICFILES_FINDERS 	

['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']

STATICFILES_STORAGE 	

'django.contrib.staticfiles.storage.StaticFilesStorage'

STATIC_ROOT 	

None

STATIC_URL 	

'/static/'

TEMPLATES 	

[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': [],
  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages']}}]

TEST_NON_SERIALIZED_APPS 	

[]

TEST_RUNNER 	

'django.test.runner.DiscoverRunner'

THOUSAND_SEPARATOR 	

','

TIME_FORMAT 	

'P'

TIME_INPUT_FORMATS 	

['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']

TIME_ZONE 	

'UTC'

USE_DEPRECATED_PYTZ 	

False

USE_I18N 	

True

USE_L10N 	

True

USE_THOUSAND_SEPARATOR 	

False

USE_TZ 	

True

USE_X_FORWARDED_HOST 	

False

USE_X_FORWARDED_PORT 	

False

WSGI_APPLICATION 	

'siteweb.wsgi.application'

X_FRAME_OPTIONS 	

'DENY'

YEAR_MONTH_FORMAT 	

'F Y'

You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

@MikaelMonjour Thank’s.
I’ll check your issue quickly.

@MikaelMonjour
I don’t understand why your server receive a GET request on the authentication resource.
Can you explain me how do you do your test ?

Thanks.

The process i did:

  1. Go into a django folder
  2. Create a venv
  3. Activate venv
  4. install forest django library
  5. Create a new django project (mysite)
  6. cd mysite
  7. run migrations
  8. I went on forest-admin website
  9. Install django app
  10. I follow the process
  11. I had the cors (in case of limitation)
  12. Try to connect
  13. Clicked on the buton (of retry)
  14. Parsed the urls you told me directly on the browser

wsgi.py

"""
WSGI config for siteweb project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application
from django_forest import init_forest

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'siteweb.settings')

init_forest() 
application = get_wsgi_application()

settings.py

"""
Django settings for siteweb project.

Generated by 'django-admin startproject' using Django 4.0.4.

For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""

from pathlib import Path
import os

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-lz1xcty^#$tt^0r=zqv-g&08z7p@x(pqzw@_o=(&uohbzan0$4'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']
CORS_ORIGIN_ALLOW_ALL = True



FOREST = {
    'FOREST_URL': 'https://api.forestadmin.com',
    'APPLICATION_URL': 'http://localhost:8000',
    'FOREST_ENV_SECRET': '5453067232f9c13fbd20f8423ad1abf3e4e5beeefb1da5cfa434909f496bf8de',
    'FOREST_AUTH_SECRET': '0a13fb8f8391acd07b52841f7737728622c98a32b4c35eb4'
}
APPEND_SLASH=False

# Application definition

INSTALLED_APPS = [
    'django_forest',    
    'django.contrib.admin',
    'corsheaders',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

MIDDLEWARE = [
    "corsheaders.middleware.CorsMiddleware",
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    "django.middleware.csrf.CsrfViewMiddleware",
    "corsheaders.middleware.CorsPostCsrfMiddleware",    
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

CORS_ORIGIN_ALLOW_ALL = True

ROOT_URLCONF = 'siteweb.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'siteweb.wsgi.application'

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'file': {
            'level': 'DEBUG',
            'class': 'logging.FileHandler',
            'filename': '/home/eduba/scripts/envoi forest/django/debug.log',
        },
    },
    'loggers': {
        'django': {
            'handlers': ['file'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}


# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/

STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

urls.py

from django.contrib import admin
from django.conf.urls import include
from django.urls import path

urlpatterns = [
    path('admin/', admin.site.urls),
    path('forest', include('django_forest.urls')),    
]

The authentication exception was raised because the django server was ran on a computer 1 minute late behind the real time. Don’t forget to check your time, an auth token built in the future can’t be used to authenticate yourself.

1 Like