Comments (1)
This is caused because the behaviour of Flask OIDC is to build the redirect URI itself. As described in the doc, OVERWRITE_REDIRECT_URI
needs to be set to the correct URI in the Flask OIDC settings. Unfortunately I don't think it's possible to fix without a patch.
This is what I did.
diff --git a/server.py b/server.py
index 85c0b79..e20cf29 100644
--- a/server.py
+++ b/server.py
@@ -75,6 +75,11 @@ if AUTH_TYPE == "oidc":
with open("/app/instance/secrets.json", "r+") as secrets_json:
app.logger.debug("/app/instances/secrets.json:")
app.logger.debug(secrets_json.read())
+
+ if DOMAIN_NAME:
+ OVERWRITE_REDIRECT_URI = DOMAIN_NAME + BASE_PATH + "/oidc_callback"
+ else:
+ OVERWRITE_REDIRECT_URI = False
app.config.update({
'SECRET_KEY': secrets.token_urlsafe(32),
@@ -86,7 +91,8 @@ if AUTH_TYPE == "oidc":
'OIDC_USER_INFO_ENABLED': True,
'OIDC_OPENID_REALM': 'Headscale-WebUI',
'OIDC_SCOPES': ['openid', 'profile', 'email'],
- 'OIDC_INTROSPECTION_AUTH_METHOD': 'client_secret_post'
+ 'OIDC_INTROSPECTION_AUTH_METHOD': 'client_secret_post',
+ 'OVERWRITE_REDIRECT_URI': OVERWRITE_REDIRECT_URI
})
from flask_oidc import OpenIDConnect
oidc = OpenIDConnect(app)
from headscale-webui.
Related Issues (20)
- Exception when opening pages that loads preauthkeys from Headscale HOT 3
- Assigning Tags in webui does not apply
- OIDC KeyCloak => can't logout
- Incorrect terminal display
- OIDC server does not support profile
- Stuck on "Loading basic auth libraries and configuring app" HOT 3
- Rename Machine to Node
- Documentation question HOT 1
- docker running error:SSL: CERTIFICATE_VERIFY_FAILED
- Could you setup a way to sponsor this project?
- WebUI Internal Server Error: HOT 3
- Gunicorn Worker Timeout HOT 2
- Problems with HAproxy reverse
- Bare Metal install fails on ubuntu 22.04 HOT 1
- SSL/TLS
- API calls to /machine are deprecated; use /node HOT 2
- Support configuration of SSH ACLs
- New user is not cleared after adding
- Cannot open /machines, /routes or /overview HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headscale-webui.