mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
Require device authorization confirmation
This commit is contained in:
@@ -337,7 +337,7 @@ replace github.com/cloudflare/circl => codeberg.org/cunicu/circl v0.0.0-20230801
|
||||
|
||||
replace github.com/pion/ice/v4 => github.com/netbirdio/ice/v4 v4.0.0-20250908184934-6202be846b51
|
||||
|
||||
replace github.com/dexidp/dex => github.com/netbirdio/dex v0.244.1-0.20260716205454-a163de3129e5
|
||||
replace github.com/dexidp/dex => github.com/netbirdio/dex v0.244.1-0.20260903153028-3d2772d8b864
|
||||
|
||||
replace github.com/dexidp/dex/api/v2 => github.com/netbirdio/dex/api/v2 v2.0.0-20260512110716-8d70ad8647c1
|
||||
|
||||
|
||||
@@ -474,8 +474,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/netbirdio/dex v0.244.1-0.20260716205454-a163de3129e5 h1:3PwQv8aR46qN2u16+Dv6udnH3sbVKX5KrGwF35CKSI0=
|
||||
github.com/netbirdio/dex v0.244.1-0.20260716205454-a163de3129e5/go.mod h1:IHH+H8vK2GfqtIt5u/5OdPh18yk0oDHuj2vz5+Goetg=
|
||||
github.com/netbirdio/dex v0.244.1-0.20260903153028-3d2772d8b864 h1:YhbiXJJFiY3iaUQTwsMDsQnA4D1FGFtfR2CS0NUJw3Y=
|
||||
github.com/netbirdio/dex v0.244.1-0.20260903153028-3d2772d8b864/go.mod h1:IHH+H8vK2GfqtIt5u/5OdPh18yk0oDHuj2vz5+Goetg=
|
||||
github.com/netbirdio/dex/api/v2 v2.0.0-20260512110716-8d70ad8647c1 h1:neE7z+FPUkldl3faK/Jt+hJK2L+1XfQ1W33TQhU9m88=
|
||||
github.com/netbirdio/dex/api/v2 v2.0.0-20260512110716-8d70ad8647c1/go.mod h1:awuTyT29CYALpEyET0S307EgNlPWrc7fFKRAyhsO45M=
|
||||
github.com/netbirdio/easyjson v0.9.0 h1:6Nw2lghSVuy8RSkAYDhDv1thBVEmfVbKZnV7T7Z6Aus=
|
||||
|
||||
@@ -1,26 +1,45 @@
|
||||
{{ template "header.html" . }}
|
||||
|
||||
<div class="nb-card">
|
||||
{{ if .DeviceUserCode }}
|
||||
<h1 class="nb-heading">Authorize Device</h1>
|
||||
<p class="nb-subheading">
|
||||
{{ .Client }} wants to sign in. Confirm this code matches the code shown on your device.
|
||||
</p>
|
||||
<div class="nb-device-code" aria-label="Device verification code">{{ .DeviceUserCode }}</div>
|
||||
<p class="nb-warning">
|
||||
Only continue if you started this sign-in and the code matches your device.
|
||||
</p>
|
||||
{{ else }}
|
||||
<h1 class="nb-heading">Grant Access</h1>
|
||||
<p class="nb-subheading">{{ .Client }} wants to access your account</p>
|
||||
{{ end }}
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="req" value="{{ .ReqID }}"/>
|
||||
<input type="hidden" name="req" value="{{ .AuthReqID }}"/>
|
||||
<input type="hidden" name="approval" value="approve"/>
|
||||
<button type="submit" class="nb-btn">
|
||||
{{ if .DeviceUserCode }}
|
||||
Authorize Device
|
||||
{{ else }}
|
||||
Allow Access
|
||||
{{ end }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="nb-divider"></div>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="req" value="{{ .ReqID }}"/>
|
||||
<input type="hidden" name="req" value="{{ .AuthReqID }}"/>
|
||||
<input type="hidden" name="approval" value="rejected"/>
|
||||
<button type="submit" class="nb-btn-connector" style="margin-bottom:0">
|
||||
{{ if .DeviceUserCode }}
|
||||
Deny
|
||||
{{ else }}
|
||||
Deny Access
|
||||
{{ end }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" . }}
|
||||
{{ template "footer.html" . }}
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
.nb-icon-email{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a7b1b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E")}
|
||||
.nb-icon-default{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a7b1b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' y1='12' x2='3' y2='12'/%3E%3C/svg%3E")}
|
||||
.nb-error{background-color:rgba(153,27,27,.2);border:1px solid rgba(153,27,27,.5);border-radius:8px;padding:12px 16px;color:#f87171;font-size:13px;text-align:center;margin-bottom:16px}
|
||||
.nb-device-code{padding:14px 16px;background-color:rgba(63,68,75,.5);border:1px solid rgba(63,68,75,.8);border-radius:8px;color:#fff;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:24px;font-weight:600;letter-spacing:3px;text-align:center;margin-bottom:16px}
|
||||
.nb-warning{color:#fbbf24;font-size:13px;text-align:center;margin-bottom:24px}
|
||||
.nb-link{color:#f68330;text-decoration:none;font-size:13px}
|
||||
.nb-link:hover{text-decoration:underline}
|
||||
.nb-back-link{text-align:center;margin-top:20px}
|
||||
@@ -67,4 +69,4 @@
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user