[{"data":1,"prerenderedAt":646},["ShallowReactive",2],{"docs-navigation":3,"docs:\u002Fdocs\u002Fadministration\u002Fusers-and-sign-in":235,"docs-surround:\u002Fdocs\u002Fadministration\u002Fusers-and-sign-in":641},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","\u002Fdocs","docs",[9,13,37,55,70,128,146,191,217],{"title":10,"path":6,"stem":11,"icon":12},"Hubstruct documentation","docs\u002Findex","book-open",{"title":14,"icon":15,"path":16,"stem":17,"children":18,"page":36},"Getting started","rocket","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[19,24,28,32],{"title":20,"path":21,"stem":22,"icon":23},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction",null,{"title":25,"path":26,"stem":27,"icon":23},"Requirements","\u002Fdocs\u002Fgetting-started\u002Frequirements","docs\u002F1.getting-started\u002F2.requirements",{"title":29,"path":30,"stem":31,"icon":23},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F3.quick-start",{"title":33,"path":34,"stem":35,"icon":23},"First steps","\u002Fdocs\u002Fgetting-started\u002Ffirst-steps","docs\u002F1.getting-started\u002F4.first-steps",false,{"title":38,"icon":39,"path":40,"stem":41,"children":42,"page":36},"Concepts","lightbulb","\u002Fdocs\u002Fconcepts","docs\u002F2.concepts",[43,47,51],{"title":44,"path":45,"stem":46,"icon":23},"How it works","\u002Fdocs\u002Fconcepts\u002Fhow-it-works","docs\u002F2.concepts\u002F1.how-it-works",{"title":48,"path":49,"stem":50,"icon":23},"Processing steps","\u002Fdocs\u002Fconcepts\u002Fprocessing","docs\u002F2.concepts\u002F2.processing",{"title":52,"path":53,"stem":54,"icon":23},"Media","\u002Fdocs\u002Fconcepts\u002Fmedia","docs\u002F2.concepts\u002F3.media",{"title":56,"path":57,"stem":58,"children":59,"icon":69},"Libraries","\u002Fdocs\u002Flibraries","docs\u002F3.libraries\u002F1.index",[60,61,65],{"title":56,"path":57,"stem":58,"icon":23},{"title":62,"path":63,"stem":64,"icon":23},"Storage","\u002Fdocs\u002Flibraries\u002Fs3","docs\u002F3.libraries\u002F3.s3",{"title":66,"path":67,"stem":68,"icon":23},"Uploading","\u002Fdocs\u002Flibraries\u002Fuploading","docs\u002F3.libraries\u002F4.uploading","layer-group",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":36},"Features","wand-magic-sparkles","\u002Fdocs\u002Ffeatures","docs\u002F4.features",[76,80,84,88,92,96,100,104,108,112,116,120,124],{"title":77,"path":78,"stem":79,"icon":23},"Browsing","\u002Fdocs\u002Ffeatures\u002Fbrowsing","docs\u002F4.features\u002F01.browsing",{"title":81,"path":82,"stem":83,"icon":23},"Search","\u002Fdocs\u002Ffeatures\u002Fsearch","docs\u002F4.features\u002F02.search",{"title":85,"path":86,"stem":87,"icon":23},"Tags","\u002Fdocs\u002Ffeatures\u002Ftags","docs\u002F4.features\u002F03.tags",{"title":89,"path":90,"stem":91,"icon":23},"Albums","\u002Fdocs\u002Ffeatures\u002Falbums","docs\u002F4.features\u002F04.albums",{"title":93,"path":94,"stem":95,"icon":23},"People and faces","\u002Fdocs\u002Ffeatures\u002Fpeople","docs\u002F4.features\u002F05.people",{"title":97,"path":98,"stem":99,"icon":23},"Groups","\u002Fdocs\u002Ffeatures\u002Fgroups","docs\u002F4.features\u002F06.groups",{"title":101,"path":102,"stem":103,"icon":23},"Duplicates and stacks","\u002Fdocs\u002Ffeatures\u002Fduplicates-and-stacks","docs\u002F4.features\u002F07.duplicates-and-stacks",{"title":105,"path":106,"stem":107,"icon":23},"NSFW","\u002Fdocs\u002Ffeatures\u002Fnsfw","docs\u002F4.features\u002F08.nsfw",{"title":109,"path":110,"stem":111,"icon":23},"Trash","\u002Fdocs\u002Ffeatures\u002Ftrash","docs\u002F4.features\u002F09.trash",{"title":113,"path":114,"stem":115,"icon":23},"Home and the dashboard","\u002Fdocs\u002Ffeatures\u002Fhome-and-dashboard","docs\u002F4.features\u002F10.home-and-dashboard",{"title":117,"path":118,"stem":119,"icon":23},"Live updates and offline","\u002Fdocs\u002Ffeatures\u002Flive-updates","docs\u002F4.features\u002F11.live-updates",{"title":121,"path":122,"stem":123,"icon":23},"Appearance and the app","\u002Fdocs\u002Ffeatures\u002Fappearance","docs\u002F4.features\u002F12.appearance",{"title":125,"path":126,"stem":127,"icon":23},"Places","\u002Fdocs\u002Ffeatures\u002Fplaces","docs\u002F4.features\u002F13.places",{"title":129,"icon":130,"path":131,"stem":132,"children":133,"page":36},"Administration","sliders","\u002Fdocs\u002Fadministration","docs\u002F5.administration",[134,138,142],{"title":135,"path":136,"stem":137,"icon":23},"Users and sign-in","\u002Fdocs\u002Fadministration\u002Fusers-and-sign-in","docs\u002F5.administration\u002F1.users-and-sign-in",{"title":139,"path":140,"stem":141,"icon":23},"API keys","\u002Fdocs\u002Fadministration\u002Fapi-keys","docs\u002F5.administration\u002F2.api-keys",{"title":143,"path":144,"stem":145,"icon":23},"Processing settings","\u002Fdocs\u002Fadministration\u002Fprocessing-settings","docs\u002F5.administration\u002F3.processing-settings",{"title":147,"icon":148,"path":149,"stem":150,"children":151,"page":36},"Self-hosting","server","\u002Fdocs\u002Fself-hosting","docs\u002F6.self-hosting",[152,156,160,164,167,171,175,179,183,187],{"title":153,"path":154,"stem":155,"icon":23},"Architecture","\u002Fdocs\u002Fself-hosting\u002Farchitecture","docs\u002F6.self-hosting\u002F1.architecture",{"title":157,"path":158,"stem":159,"icon":23},"Telemetry","\u002Fdocs\u002Fself-hosting\u002Ftelemetry","docs\u002F6.self-hosting\u002F10.telemetry",{"title":161,"path":162,"stem":163,"icon":23},"Sharing one GPU","\u002Fdocs\u002Fself-hosting\u002Fgpu","docs\u002F6.self-hosting\u002F2.gpu",{"title":62,"path":165,"stem":166,"icon":23},"\u002Fdocs\u002Fself-hosting\u002Fstorage","docs\u002F6.self-hosting\u002F3.storage",{"title":168,"path":169,"stem":170,"icon":23},"Backups","\u002Fdocs\u002Fself-hosting\u002Fbackups","docs\u002F6.self-hosting\u002F4.backups",{"title":172,"path":173,"stem":174,"icon":23},"Updating","\u002Fdocs\u002Fself-hosting\u002Fupdating","docs\u002F6.self-hosting\u002F5.updating",{"title":176,"path":177,"stem":178,"icon":23},"Scaling","\u002Fdocs\u002Fself-hosting\u002Fscaling","docs\u002F6.self-hosting\u002F6.scaling",{"title":180,"path":181,"stem":182,"icon":23},"HTTPS and a domain","\u002Fdocs\u002Fself-hosting\u002Freverse-proxy","docs\u002F6.self-hosting\u002F7.reverse-proxy",{"title":184,"path":185,"stem":186,"icon":23},"Troubleshooting","\u002Fdocs\u002Fself-hosting\u002Ftroubleshooting","docs\u002F6.self-hosting\u002F8.troubleshooting",{"title":188,"path":189,"stem":190,"icon":23},"The config file","\u002Fdocs\u002Fself-hosting\u002Fconfig-file","docs\u002F6.self-hosting\u002F9.config-file",{"title":192,"icon":193,"path":194,"stem":195,"children":196,"page":36},"Reference","book","\u002Fdocs\u002Freference","docs\u002F7.reference",[197,201,205,209,213],{"title":198,"path":199,"stem":200,"icon":23},"Environment variables","\u002Fdocs\u002Freference\u002Fenvironment","docs\u002F7.reference\u002F1.environment",{"title":202,"path":203,"stem":204,"icon":23},"Worker roles","\u002Fdocs\u002Freference\u002Fworker-roles","docs\u002F7.reference\u002F2.worker-roles",{"title":206,"path":207,"stem":208,"icon":23},"API","\u002Fdocs\u002Freference\u002Fapi","docs\u002F7.reference\u002F3.api",{"title":210,"path":211,"stem":212,"icon":23},"Keyboard shortcuts","\u002Fdocs\u002Freference\u002Fkeyboard-shortcuts","docs\u002F7.reference\u002F4.keyboard-shortcuts",{"title":214,"path":215,"stem":216,"icon":23},"Models","\u002Fdocs\u002Freference\u002Fmodels","docs\u002F7.reference\u002F5.models",{"title":218,"icon":219,"path":220,"stem":221,"children":222,"page":36},"Hubstruct Cloud","cloud","\u002Fdocs\u002Fcloud","docs\u002F8.cloud",[223,227,231],{"title":224,"path":225,"stem":226,"icon":23},"Getting started with the cloud","\u002Fdocs\u002Fcloud\u002Fgetting-started","docs\u002F8.cloud\u002F1.getting-started",{"title":228,"path":229,"stem":230,"icon":23},"Plans and billing","\u002Fdocs\u002Fcloud\u002Fplans-and-billing","docs\u002F8.cloud\u002F2.plans-and-billing",{"title":232,"path":233,"stem":234,"icon":23},"Moving between cloud and self-hosted","\u002Fdocs\u002Fcloud\u002Fmoving","docs\u002F8.cloud\u002F3.moving",{"id":236,"title":135,"body":237,"description":635,"extension":636,"eyebrow":129,"icon":23,"meta":637,"navigation":638,"path":136,"seo":639,"stem":137,"__hash__":640},"docs\u002Fdocs\u002F5.administration\u002F1.users-and-sign-in.md",{"type":238,"value":239,"toc":621},"minimark",[240,245,254,259,272,276,287,311,319,330,338,342,348,388,392,407,410,414,420,424,512,518,522,533,594,604,608,617],[241,242,244],"h2",{"id":243},"accounts","Accounts",[246,247,248,249,253],"p",{},"Everyone who uses Hubstruct has an ",[250,251,252],"strong",{},"account",": a first and last name, a username, and a password, Google, or both.",[255,256,258],"h3",{"id":257},"the-owner","The owner",[246,260,261,262,267,268,271],{},"The first account, made during ",[263,264,266],"a",{"href":265},"\u002Fdocs\u002Fgetting-started\u002Fquick-start#5-open-it","setup",", is the ",[250,269,270],{},"owner",". The owner can't be removed. Only the owner manages Google sign-in.",[255,273,275],{"id":274},"adding-people","Adding people",[246,277,278,279,282,283,286],{},"In ",[250,280,281],{},"Settings → Users",", choose ",[250,284,285],{},"Add account"," and give:",[288,289,290,298,305],"ul",{},[291,292,293,294,297],"li",{},"their ",[250,295,296],{},"first and last name",";",[291,299,300,301,304],{},"a ",[250,302,303],{},"username",": letters, numbers, dots, dashes and underscores;",[291,306,300,307,310],{},[250,308,309],{},"password"," of at least 8 characters. They can change it on their profile.",[246,312,313,314,318],{},"Or let them ",[263,315,317],{"href":316},"#signing-in-with-google","join with Google",".",[246,320,321,322,325,326,329],{},"From the same list you can ",[250,323,324],{},"set"," someone's password, or ",[250,327,328],{},"remove"," their account. Nobody can remove their own account.",[331,332,335],"callout",{"title":333,"type":334},"Permissions","info",[246,336,337],{},"For now, everyone with an account has full access: every library, every setting. Favorites of people and groups are kept per account; everything else is shared. Roles and per-library permissions are planned.",[241,339,341],{"id":340},"your-profile","Your profile",[246,343,344,347],{},[250,345,346],{},"Profile",", from your avatar in the top bar, has:",[288,349,350,361,366,373,381],{},[291,351,352,353,356,357,360],{},"your ",[250,354,355],{},"profile picture",": select it to upload a picture, choose one from the library, or remove yours. Without one, your picture is drawn from your username. You can also right-click any media and choose ",[250,358,359],{},"Make my profile picture",". Either way, the picture is cut to a square around what stands out in it;",[291,362,363,364,297],{},"your name and username, and your ",[250,365,309],{},[291,367,368,369,372],{},"your linked sign-ins, such as ",[250,370,371],{},"Google",", to link or unlink;",[291,374,375,378,379,297],{},[250,376,377],{},"Appearance",": your theme and theme color. See ",[263,380,377],{"href":122},[291,382,352,383,385,386,318],{},[250,384,139],{},". See ",[263,387,139],{"href":140},[241,389,391],{"id":390},"sessions","Sessions",[246,393,394,395,398,399,402,403,406],{},"Signing in starts a ",[250,396,397],{},"session",", kept in a secure, HTTP-only cookie. A session lasts ",[250,400,401],{},"30 days"," and is extended while you use it, so you stay signed in on devices you use, and are signed out of ones you don't. ",[250,404,405],{},"Sign out"," ends it at once.",[246,408,409],{},"Passwords are stored as scrypt hashes. Sessions and API keys are stored only as SHA-256 hashes, so even someone with a copy of the database can't use them to sign in.",[241,411,413],{"id":412},"signing-in-with-google","Signing in with Google",[246,415,416,417,318],{},"Hubstruct can let people sign in with their Google account. The app does the sign-in with Google using an OAuth client of its own, then hands the API the proof Google gives it. The API only takes that proof from apps the owner has chosen in ",[250,418,419],{},"Settings → Sign-in",[255,421,423],{"id":422},"setting-it-up","Setting it up",[425,426,427,444,460,504],"ol",{},[291,428,429,430,436,437,440,441,318],{},"In the ",[263,431,435],{"href":432,"rel":433},"https:\u002F\u002Fconsole.cloud.google.com\u002Fapis\u002Fcredentials",[434],"nofollow","Google Cloud console",", create an ",[250,438,439],{},"OAuth client ID"," of type ",[250,442,443],{},"Web application",[291,445,446,447,450,451,455,456,459],{},"Add the app's ",[250,448,449],{},"redirect URI"," to it: the address you reach Hubstruct at, followed by ",[452,453,454],"code",{},"\u002Fauth\u002Fgoogle\u002Fcallback",", such as ",[452,457,458],{},"https:\u002F\u002Fphotos.example.com\u002Fauth\u002Fgoogle\u002Fcallback",". Settings → Sign-in shows the exact address.",[291,461,462,463,466,467],{},"Give the app the client's ID and secret, in ",[452,464,465],{},".env",", and restart it:",[468,469,474],"pre",{"className":470,"code":471,"language":472,"meta":473,"style":473},"language-bash shiki shiki-themes github-dark github-light","GOOGLE_CLIENT_ID=1234-abcd.apps.googleusercontent.com\nGOOGLE_CLIENT_SECRET=GOCSPX-…\n","bash","",[452,475,476,493],{"__ignoreMap":473},[477,478,481,485,489],"span",{"class":479,"line":480},"line",1,[477,482,484],{"class":483},"shWlK","GOOGLE_CLIENT_ID",[477,486,488],{"class":487},"spKkM","=",[477,490,492],{"class":491},"skb7c","1234-abcd.apps.googleusercontent.com\n",[477,494,496,499,501],{"class":479,"line":495},2,[477,497,498],{"class":483},"GOOGLE_CLIENT_SECRET",[477,500,488],{"class":487},[477,502,503],{"class":491},"GOCSPX-…\n",[291,505,278,506,508,509,318],{},[250,507,419],{},", the app's client ID is now shown. Choose ",[250,510,511],{},"Take its sign-ins",[246,513,514,515,318],{},"The secret stays with the app. The API only keeps the client IDs it takes sign-ins from. Another app, such as a phone app, has its own OAuth client: add its client ID under ",[250,516,517],{},"Another app's client ID",[255,519,521],{"id":520},"who-can-join","Who can join",[246,523,524,525,528,529,532],{},"Anyone whose account has ",[250,526,527],{},"linked Google"," (from their profile) can always sign in with it. ",[250,530,531],{},"Who can join with Google"," decides who else gets an account the first time they sign in:",[534,535,536,549],"table",{},[537,538,539],"thead",{},[540,541,542,546],"tr",{},[543,544,545],"th",{},"Choice",[543,547,548],{},"Who gets an account",[550,551,552,563,577],"tbody",{},[540,553,554,560],{},[555,556,557],"td",{},[250,558,559],{},"Linked only",[555,561,562],{},"Nobody new: only existing accounts that have linked Google.",[540,564,565,570],{},[555,566,567],{},[250,568,569],{},"Invited",[555,571,572,573,576],{},"Also anyone whose ",[250,574,575],{},"verified"," Google email you've invited.",[540,578,579,584],{},[555,580,581],{},[250,582,583],{},"Domains",[555,585,586,587,590,591,318],{},"Also anyone with a verified Google email at the ",[250,588,589],{},"email domains"," you list, such as ",[452,592,593],{},"example.com",[246,595,596,597,599,600,603],{},"Under ",[250,598,569],{},", add emails with ",[250,601,602],{},"Invite an email","; withdraw an invite at any time. An invite is used up when its person first signs in.",[255,605,607],{"id":606},"linking-google-to-an-existing-account","Linking Google to an existing account",[246,609,610,611,282,613,616],{},"On your ",[250,612,346],{},[250,614,615],{},"Link Google account"," and sign in with Google. From then on you can sign in either way. You can unlink it again, as long as you have a password to fall back on.",[618,619,620],"style",{},"html pre.shiki code .shWlK, html code.shiki .shWlK{--shiki-default:#E1E4E8;--shiki-light:#24292E}html pre.shiki code .spKkM, html code.shiki .spKkM{--shiki-default:#F97583;--shiki-light:#D73A49}html pre.shiki code .skb7c, html code.shiki .skb7c{--shiki-default:#9ECBFF;--shiki-light:#032F62}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}",{"title":473,"searchDepth":622,"depth":622,"links":623},3,[624,628,629,630],{"id":243,"depth":495,"text":244,"children":625},[626,627],{"id":257,"depth":622,"text":258},{"id":274,"depth":622,"text":275},{"id":340,"depth":495,"text":341},{"id":390,"depth":495,"text":391},{"id":412,"depth":495,"text":413,"children":631},[632,633,634],{"id":422,"depth":622,"text":423},{"id":520,"depth":622,"text":521},{"id":606,"depth":622,"text":607},"Accounts, the owner, passwords and sessions, and signing in with Google, with invites and allowed domains.","md",{},true,{"title":135,"description":635},"guZCbSuPc_Uvse-Y62pxX75pxEu5zZVYJ2xu6XuSGxw",[642,644],{"title":125,"path":126,"stem":127,"description":643,"children":-1},"Where your media were taken, as places to browse — the towns they were taken in, made as they arrive, and places of your own — and setting a media's location or place by hand.",{"title":139,"path":140,"stem":141,"description":645,"children":-1},"Keys for scripts and other apps to use Hubstruct's API as you.",1795744073230]