PageSourceSearch

https://test-passkeys.uk/chunk-ELR4Z7PM.js

js test-passkeys.uk collected 2026-10-02 02:10:23 UTC 3,797 bytes, 1 lines download raw bytes

1import{a as L}from"./chunk-TK7L4KVH.js";import{c as _,f as M,g as N}from"./chunk-VEX4CU56.js";import{b as A,c as D,f as O,k as R,l as T}from"./chunk-NINGMRLE.js";import{b as u}from"./chunk-7JHUBPOT.js";import"./chunk-UKKDBGUF.js";import"./chunk-OB2LTP34.js";import{q as S,r as E}from"./chunk-JGEVEWWZ.js";import{$a as t,Ab as w,Bb as P,Ja as y,U as c,Ua as g,Ub as z,Va as h,_a as l,ab as a,bb as p,c as f,jb as v,kb as C,va as n,vb as o,wb as b,xb as k,zb as x}from"./chunk-JE7BTD77.js";function W(m,e){if(m&1&&(t(0,"div",7),p(1,"app-icon",15),t(2,"span"),o(3),a()()),m&2){let i=C();n(),l("size",18),n(2),b(i.error)}}var I=class m{router=c(S);webauthn=c(N);api=c(L);deviceName="";isLoading=!1;error="";handleCreate(){if(!this.isLoading){if(!this.webauthn.isAvailable()){this.error="Passkeys aren't available here - WebAuthn needs a secure (HTTPS) context.";return}this.error="",this.isLoading=!0,this.api.createOptions().subscribe({next:e=>this.runCeremony(e),error:e=>this.fail(u(e,"Could not start passkey registration."))})}}runCeremony(e){return f(this,null,function*(){let i;try{let s=yield this.webauthn.createCredential(_(e));i=M(s)}catch(s){this.fail(this.ceremonyError(s));return}let r=this.deviceName.trim();r&&(i.name=r),this.api.createVerify(i).subscribe({next:()=>this.router.navigate(["/profile/passkeys"]),error:s=>this.fail(u(s,"Could not verify the new passkey."))})})}fail(e){this.isLoading=!1,this.error=e}ceremonyError(e){return e instanceof DOMException?e.name==="NotAllowedError"?"Passkey registration was cancelled or timed out.":e.name==="InvalidStateError"?"A passkey for this account already exists on this device.":`${e.name}: ${e.message}`:e instanceof Error?e.message:"The passkey ceremony failed."}static \u0275fac=function(i){return new(i||m)};static \u0275cmp=y({type:m,selectors:[["app-create-passkey"]],decls:24,vars:7,consts:[[1,"page","page--narrow"],["routerLink","/profile/passkeys",1,"page-back"],["name","chevron-left",3,"size"],[1,"auth-icon-tile"],["name","passkey",1,"c-primary",3,"size"],[1,"title"],[1,"subtitle"],[1,"alert-error",2,"margin-bottom","1rem"],["for","deviceName",1,"label"],[1,"c-muted"],[1,"field",2,"margin-bottom","1.5rem"],["name","smartphone",1,"c-muted",3,"size"],["id","deviceName","type","text","placeholder","e.g., iPhone 15","maxlength","64",3,"ngModelChange","ngModel"],[1,"info-panel",2,"margin-bottom","1.5rem"],[1,"btn","btn--primary","btn--block",3,"click","disabled"],["name","x-circle",3,"size"]],template:function(i,r){i&1&&(t(0,"div",0)(1,"a",1),p(2,"app-icon",2),t(3,"span"),o(4,"Back to Passkeys"),a()(),t(5,"div",3),p(6,"app-icon",4),a(),t(7,"h1",5),o(8,"Register a New Passkey"),a(),t(9,"p",6),o(10,"Create a passkey for your account"),a(),g(11,W,4,2,"div",7),t(12,"label",8),o(13,"Device Name "),t(14,"span",9),o(15,"(optional)"),a()(),t(16,"div",10),p(17,"app-icon",11),t(18,"input",12),P("ngModelChange",function(d){return w(r.deviceName,d)||(r.deviceName=d),d}),a()(),t(19,"div",13)(20,"p"),o(21," Your browser or password manager will prompt you to create the passkey (Face ID, Touch ID, Windows Hello, or a security key) and choose where to store it. You can rename it afterwards. "),a()(),t(22,"button",14),v("click",function(){return r.handleCreate()}),o(23),a()()),i&2&&(n(2),l("size",18),n(4),l("size",48),n(5),h(r.error?11:-1),n(6),l("size",20),n(),x("ngModel",r.deviceName),n(4),l("disabled",r.isLoading),n(),k(" ",r.isLoading?"Waiting for your device\u2026":"Create Passkey"," "))},dependencies:[T,A,D,R,O,E,z],styles:[".title[_ngcontent-%COMP%]{text-align:center;margin-bottom:.5rem}.subtitle[_ngcontent-%COMP%]{text-align:center;color:var(--muted-foreground);margin-bottom:2rem}.label[_ngcontent-%COMP%]{display:block;font-size:.875rem;margin-bottom:.5rem}"]})};export{I as CreatePasskeyComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.