You are browsing as a guest. Sign up (or log in) to start making projects!

moon

@moon

Joined June 1st, 2026

  • 35Devlogs
  • 2Projects
  • 0Ships
  • 0Votes
beep bwap. i am space birb. i am stupid. and a bad coder. Have a great day :)!
Open comments for this post

6h 52m 37s logged

meow meow wuuu auth. I, the space birb that somehow survived the scope registry dlc is now back in the frontend mines.. i am dusty now. This time I did what i promosed (kiinda), the oauth frontend no longer speaks bitflags, it speaks scopes like me a civilicized bird that can burst into fire.

FIRST, icons. yes. FINALLY, tiny litle pictures right next to buttons and stuff because apparently text alone was not enough to make it look good in my eyes. also the checkbox box now eats data-fs-invalid / aria-invalid props from formsnap so my angry red INVALID style exists now.

SECOND, the scopes. the whole reason i was in the mines. what a mess. the create and edit pages now ask the backend what scopes exist (the edit one asks with the app id so it gets only what that app can use), show the identifier and the description, and send a plain space separated string. one of the loving problems i had and that i think i fixed is the save button was always dirty because i compared the scopes as one big string, and the backend/frontend gave them back in different orders (because they are not sorted… i wont sort them bruv). now i compare the actual set of scopes, so order does not matter. also, if you save zero scopes the backend adds profile on its own, so now also the frontend imitates that behaviour or else you would just have visually no scopes when in reality you have the default “profile” scope.

THIRD, the audit log item now shows the changes diff. “before -> after”, red strikethrough for removed, green for added so you can see “oh noes, i renamed the wrong thing and do not remember what it was named before”. for fields that were created or deleted it only shows one side (obviously. would you really show on deletion “oh i created nothing but this was erased”… that’s wasteful, just go staright to the point). also made the item expandable when there are changes even if there is no ip/location, because apparently some entries have changes but no ip and the old mr code just hid everything behind a button that did not exist.

FOURTH, i hate svelte kit 3 “#lib” with the necessity of putting “.js” on files when they are imported or autocompleted with the “.ts” extension.

FIVTH, session items now show the browser and os from the user agent. no more… a literal placeholder that i forgot to make it a real component.

and that’s it. no more bitflags, no more forgotten placeholders, no more uhh uglyness because of no icons and no more scope strings in random orders. i still have things to do, like… uhh… admin panel and image uploading.
OH GOD THE TIME IS RUNNING OUT I WILLL i am hungry i deserve uhh gummy worms.
shall you see the useless screenshots of my beautiful buttons with icons (i am somehow and sadly still bad a design okay? i feel kinda proud of how it looks soo squishable the ui):

0
0
2
Open comments for this post

6h 49m 54s logged

oh hi again, i guess my turbo mode is half engaged. i killed the bitflags. YES, the mr “scope” bitflags for the oauth2.1 that would make me recompile the whole backend jsut to add a new scope. like, imagine wanting “boots” to exist and having to type… WITH MY KEYBOARD AND RECOMPILE!? ew. NO MORE! now the scopes live in the settings.toml and get registered on startup. Just push shome keys in the settings, restart and boomby boom new usable scope. I will miss the recompiles… (i will not :])

RIGHT! My beautiful scope registry just stores the identifier (the name, fancy name because.. yes) of the scope with its scope definition. What’s the scope definition? … it already says it in the name, its the definition of the scope that includes, again, the identifier, the description to show in consent pages or when managing an application, the allowed application ids for when you want one scope to only be usable by specific applications because you like controlling everything, the allowed client type (first party or third party) and the required user flags which is like “is this user even allowed to BE OFFERED this scope?.

Scopes are obviously stored now as a text field in the db, parsed like civilized birds with identifiers converted to lowercase, spaces made into “_” aaaand everything else that isnt ascii just gets thrown out. (for example, “MOOOOON BEEPER” -> “mooooon_beeper”).

and course you can ask what youre allowed to use. just ask mr meow meow (meow auth 2) server “hey server, here’s my app, what scopes can i pick?” aand it throws you the scopes you can use filtered by your own user flags, the application’s type and the allowlist. You can also just say “hey servah, what scopes can i use independant of my app (what global scopes you have)?” to get the global scopes.

plus as a little plus plus, now the settings docs are able to push comments on optional types (ahem, the additional oauth scopes).

anyways, SCOPES are configurable, additional oauth scopes do have docs or else you wont even know how the heck you can add them AND you dont need anymore to recompile to add a new scope which is nice in the end. i need to keep uhm clanking my clawsw into the keyboard to finish thing and deploy it. SHALL YOU SEE the most beautiful screenshots of my beautiful doc comment and the handler handling the simplest thing (giving the scope name and descirption, ah so beautiful):

0
0
4
Open comments for this post

10h 14m 6s logged

ooh this is really bad. i have to engage turbo mode again… oh noes OH NO. Wasted big time making the oauth consent and own apps management frontend, fixing stuff past me got wrong or didn’t implement because i was lazy. i am still lazy. i also added a tiny amount of ui legos and fixed a stupid db brain logic error.

Right, we gotta move as my devlogs, journals, texts whatever this is, are very very long. noone will read them. they will hate it. I WILL BURN MOON TO A CRISP GODDAMIT.

My beautiful backend got a really thin coat of fixes, including a stupid error ive made. The error came from making a db constraint so a user could authorize an app only once. OKAY, but what happened? Only one user could ever authorize an app, because past me left unique constraints on the user’s id and oauth app’s id in both pending and actual authorizations. Basically i forgot to delete the single unique constraints (“int meow unique”, unique is the constraint!) while the tuple (its the “THIS COMBINATION OF THINGS MUST BE UNIQUE”, not each individual field like a normal “int meow unique”). you don’t know my confusion searching why i couldnt authorize the same app from another user lol.. i keep repeating it but GOD DAMMIT PAST ME i hope i become uhm… let’s see… a space birb hotdog nom nom with ONLY ketchup. thanks.

Ah, right CORs. ohohoho, cors. I swapped from “oauth debugger” to “oauth playground” because I.. forgot the word debugger and stumbled upon mr. oauthplayground(.io)… I DIDNT KNOW THERE WAS A BETTER THING THAN THE OAUTH DEBUGGER I USED. THIS NEW THINGY thing is a million times better AND can even test OIDC and fetch the “.well-known” oauth metadata endpoint for both modes (oauth 2.1 and oidc). good stuff.
But ofc, as always, here comes the mr. cors shinanigans. You should know that I made ALL my routes under “/v1/*” allow requests (via cors) from my frontend ONLY. Bad decision, as oauth clients need routes too, like.. i dont know.. the token endpoint that LITERALLY lets an app access whatever it asked for?… look at my paws or hands or whatever, what would be the best way to fix this? correct you deserve an star with a little uhm feather, separating the oauth part of my server into paths that the frontend will only use and paths that others will use (so no cors [heh tldr lite]). The paths the frontend touches still have cors… it makes me feel safe. also, because of the frontend cors, i couldnt redirect from the frontend consent page to the client’s backend because it was outside of the frontend origin. i had to workaorund it with a html form because I ABSOLUTELYTLITNINTATITONAIIONY REFUSED to add an entire json struct for a simple goofy response with one field named “redirect_to”.

FINNALY, the oauth frontend part finally exists!! the consent page loads the pending flow (see stupid screenshot), shows the app and the scopes in human words (minus openid, which i hide because its literally useless for the user). Then you have the typical list of your own apps to manage (see screenshot), with a create button
(yes, its a requirement). And lastly the authorized apps HAS NOW real data too with the app name, boom, last used date, boomy and human readable scopes… its very ugly as i really DONT KNOW HOW TO make it stylish hahaha.

also NEW legos for the frontend were born out of my hands for my fun, say hi to mr checkbox and the checkbox box (its a box that has a checkbox :]) plus did some cleanup on the button square style and separated the mute style. hiii guys.

anyways, this is it. i have to enable my turbo mode. i must enable or all of this was for nothing AND I WANT MY PRIZZE (even though this is clearance week… AWW MAN WHY DID I PROCASTINATE THIS HARD) >:( OR ELSE me angy with wall as always. ah, the time has come to greet you to my shitty screenshots, including one of my badly stupid drawings depicting me saying that the authorized apps collapsible is ugly:

0
0
16
Open comments for this post

10h 8m logged

pew pew cabosh, wawah space birb is very sleepy. BREAKING NEWS, i added and changed a lot of things so i could make a delicious soup of changes that changed my old changed code that i yes.

minimal frontend work called making the passkey section button go crazy with colors, authenticator icon (just search “aaguid explorer”, its not crazy work) and having a dialog telling “hi do you want to rename this, no? okay”. I also have collapsibles that hide info from your lil nonfluffy face when its useless.

Now my crappy server knows from where you are connecting (who would have known that a server could know that) and where you live (oh no [its approximated from your ip]). THe latter only works when the instance is proxied under cloudflare (it even gets mad if a request doesnt have the headers it wants when you have enabled the “under cloudflare” mode).

the audit log single method to do everything™ has been swapped with a builder (i love this), AND its info now includes that same ip and location (actor related [who did it]). all fields are now obligatory for… audit log purposes, because before i just pushed null on the db for things i didnt want to show the user MAKING a pretty stinker audit log that does not show who did what. i really dont know whata past me thought, because you can keep everything on the db and just show what you want to the user. idk, past me thinking in uhm not portals (yes).

okay, more slurry of things. mah beautiful fix so the JWKS (signing keys used to… sign a jwt! [important for OpenID]) update when the database JWKS changed, spammed the hell out of the db and log as it polled instead of waiting for the db (or an instance) to say “I UPDATED IT GUYSS!1”!1”. This comes from the instances cache’ing JWKS instead of saying “could you repeat that” to the db (too many requests = blue elephant cry and explosions), so they need to know when the db changes or THEY WILL BE out of sync!!

mr past me also thought that it was a good idea to store the oauth token code (used to get an access token) in plaintext in the muffing db, SMTH YOU SHOULDNT AT ALL DO. now its just hashed via hmac just like everything else. man i am GOOOD at this job of so called programming, having to go back to edit a thing i called done AND then HAVINGTO edit and edit and edit. this is so fun that I WILL BURST into FLAMES because of how stoopid i am

meanwhile, you also have me deserving to be cooked with rice because I made a condition in the oauth token exchange that when SOMEONE somehow miss types or gets access to the oauth token code but has the wrong client_id, the temporary code gets deleted… and you know what i forgot? i forgot to commit the changes to the db, so the code never was deleted lol. i love these kind of stupid goofy pain errors that arent even errors. AALSO I reprettyfied the oauth helpers because after working on them a long time ago, i didnt know what were they doing and it wasnt fun nor funny >:( [i was mad {i am still mad, with that space birb… i want to sentence past moon to sad corner jail for 12 seconds}].

NOW teeny tiny additions!“1 the ratelimiter now exposes a “Retry-After” per a hacker news old moldy article i found, plus exposes its headers on cors. the audit log now does its job even in more parts! now it also tracks the totp recovery code usage [i frankly forgot about it :(].Changing your email or name now requires sudo minus the name on register. AND the app startup has now a beautiful banner saying “meow auth” in cursive. its pretty :3, makes it stylishinning. I also moved and added to the service manager (the watcher) a way to have service names and to launch services from inside of it (for some reason i used a method that was outof place for ages lol).

oh no my time has come nnonono, i give you permission to see my trashy work in screenshot format (so modern)… yet i shall push towards completion of this meowing meow meow authing meow auth server:

0
0
17
Open comments for this post

11h 15m 56s logged

hi hello hiiii, stupid space birb back from long bed sleep break. CATCHING UP, i have swapped to resident passkeys, fixed jwk refresh feature not working, beautified toml settings, added 2fa replay protection and audit log beautification.

alright.. prepare for a long boring devlog as always. I finally swapped to resident passkeys after thinking about it for days (hours)! That means.. NO MORE user enumeration problemo with passkeys, yippie. it wasnt really a pain in the feathered buttocks, like it was just enabling a crate flag and boomy boom (and it even works on the frontend!).

also, i patched with scotch tape a stupid buggy bug about the email templates, becuase I used a lazylock to store the email templater engine stuffy, when SOME random goofy template or data was wrong for whatever reason, it would poison the lazylock and the next time it was used it would just say “oh noes, i am broken, poisoned my childs. GO HECK YOUR SELF”… i just fixed the template part by checking if tera likes them in the global state creation. i love scotch tape, it smells great.

while doing that, i finally addressed the beautiful jwks not updating on all instances because in MY JOB QUEUE only one running server instance can eat the job. that means, if you have 2 instances running, the one that is the unfortunate one that didnt eat the job will have stale jwks until the next time it is restarted. fixed it with some beautiful blue elephant database screaming “HEY GUYS, THE JWKS HAVE BEEN UPDATED” and the other instances will be like “oh, okay, i will update my beautiful jwks now”.

finally, 2fa, or as i like to call it, TOTP, has been taken cared like a baby and then thrown again to the battle field after giving it the power up of replay protection. That means, if you use a code, it will be marked as used and you cant use it again (this only works with valid codes). makes you wait more smh.

THE SETTINGS got a layer of microscopic makeup because i was like “man, these setting name are weired? what if the settings file had comments to know what the heck is this beautiful knob named ‘do_not_touch_this’”. yes i did that. it was a big red booty pain as i had rerereremember how to do proc_macros and how the heck did i even update the toml files with new entries without making them implode with gibrish. AND WE ALL KNOW NOW that ‘do_not_touch_this’ is a setting that if you set it to true, it will make this space birb implode in flames and become dust (yes, like a real firework going CHIRPAAAAAAAAAAAH pop).

and the final thing given some body work spray was the audit log. no more caveman moonbeeper style ‘log’ method with a thousand things. now we have the SAME thing but as a builder with a ‘save’ method. it just makes the code easier to read and understand. also, the audit log now has a “what resource¿” and “what ip?” and i removed the audit entry making from inside the auth helpers to outside. it was just an inconvenient place to put it, i dont evne know why would moonbeeper put it there… oh right i am moonbeeper. I DID IT BECAUSE it was a great place in those times.

alright, HERE’s your typical bad screenshots that are trashign and god i am sleepy:

1
0
50
Open comments for this post

9h 14m 4s logged

hi hello this is space bird. i have eaten 9h hours of real world time in just making the dialog component. I mean, IT WAS for making the 2FA prompts for when you wanted to enable it or disable and bleh bluh.. atleast it does look great… and i still need to add icons.

the prompt is just the typical 2fa enable that gives you a qr or the 2fa secret if you cant scan the qr.

The dialog component was pretty much made in nothing, in air time (free :D). the thing that took a bit was just the styling BUT WAHT did take a BIG LOOOT of time was just making the 2FA dialogs. lik gha damn hecking “2FA prompt” and “beep boop enabling dialogs”.. why?! becuase they are PACKED like a lasagna with forms, tanstack fetching, dialog steps and other stupid stuff to make it atleast not confusing for the user to navigate with tree sized buttons that dont work (becuase you are on the wrong step!!!!1 or already did everything lol). i mean, besides that custom stuff, it just reuses components like the pin or qr svg and… for now, also uses the spinner icon on the buttons you click to manage 2fa as i couldnt be asked to add real icons for now (leaving them for lasts).

next up working work is more dialogs (for the passkey setup [so it isnt just a spinner without any “magic guideance”]), a collapsible comp to wrap the info items to show EVENTUALLY some metadata like, in the session items, browser, ip, what user was that did that thing and etc. Its just so i dont balloon the “info items” BECaUSE they are supposed to be some kind of “quick info”. broom brroom, i love wasting time on these stupid things (and wiring them!) >:3.

LEAVING that tiny goofy work that apparently took hours to do. I am thinking and WILL be doing a beautiful swap into using resident passkeys (the ones that dont require me to know the user’s email in advance). yes, i know i said before that i dont wanted and ew ew resident. but man, its just easier for the end user to click a magical button to login directly. AND AND this even protects me from someone slapping the meowbackend with the email fish to see who is registered (with a passkey) by checking if the user’s email makes the selector appear. still, some part of me still thinks this is really bad idea but i want to do it tho… what could go wrong hah! i might aswell go to the cooking pot already and make some uhh chicken soup made of space birb.

that’s it, i still feel like i havent done anything. Here’s your beautiful video of showing the beautiful dialog going “hi” “goodbye” (the video shows me enabling 2fa, viewing recovery codes and disabling it [with a recovery code]):

0
0
5
Open comments for this post

10h 35m 14s logged

would you look at that, 10h… i love wasting time. Now THIS thing fetches some bits of data like the audit log, my passkeys, adding those and even modifying the username (you are forced to do it)!

BUT big buty, i had to add the mr /signup/complete where you set your prefered username, like moon (its a me!), or else the backend will straight up refuse anything you want to do. AFTER changing it, you can do everything else a normal user can [by Default the username is just the user’s email AND THAT IS NOT PRETTY AT ALL >:(]

FIRST OF all i grabbed my magic cup for tea and made the audit log page (it does not even have anything special)! .. oh right, for that i needed to know how the heck you even send requests with tanstack. so uhh,, blah bleh bluh wawa BOOM i now know how to call a method and get my data back AAnd even make infinite fetchers (IT kinda hates my way of giving data [its wrapped in {3} onion layers {request.data.data.data}, the ones that make you cry a bit]).

i also synced my auth state with the tanstack client so it doesnt do two trips every time.

okay now. TO make the audit log thingy, i did some beautiful matching so the type, creation and guy who did the action (probably the user) are actually human readable with a limit of 8 items (or else the /me page would be as long as this project’s crappy devlogs). When there’s more, a beautiful “view more” button appears (separate page).

For this, so called “view more” page, i used the infinite queries. while at first i just puuushed the data into the dom with the #each (svelte thingy), chrome do be VERY very mad when there’s a lot of entries in there (The audit log, because it logs actions in your account, can get very huge. Because actions like the baddie Session action logs each time you log in or log out), SOO i did what someone whose browser is eating more than 10gb does, using a virtual list to render the it! (IT only renders items when they are visible, hidding [removing from the dom] non visible ones. this fixes the “OH gosh THOSE 200 things THAT I CANT EVEN SEE, ARE EATING MY precious ram”). OHh and you can press ESC to leave the page because i made a cool component that lets me plug in a callback for specific keyboard events :D.

SECOND, the passkey stuff. yeah, pretty easy thanks to libraries like SimpleWebAuthn that do the hard work of telling the browser “hey, authenticate this guy please” or “hiya, registrate this passkey please”. its just querying what passkys you have to know… hwat passkeys you have and that’s it.

BUT sadly, an actually sadly, my passkeys are non resident (I cant have a simple button to just login, I need you email before i can use the passkey). Thaaat means I havea teeny big tiny small user enumaration problemo becuase the backend can reveal that an user has a passkey registered and, in turn, we know that user is registered. a bad guy can just atack with “oh noes, your passkey has been stolen. pls give a undecillion of moneys”.

third, i had to add the sudo page. It does what you think, reauthenticate to do sensitive operations like adding a passkey. Pretty simple, it redirects directly to an email code if the user does not have a passkey or totp enabled (email code is always enabled), if they have those, it just shows a selection screen.

fourth, i had to fix up some stupid things with the api schema of the backend becuase I either forgot to put a body on the responses (like the passkey/webauthn routes) or just fix up a teeeeeny tiny setting thing that wasnt correct (its the webauthn/passkey rp_origin [allowed pages to register/use a passkey} becuase it jsut used the backend url and THAT is not correct).

so tahat’s it, shall you see some stupid screenshots and not even a video because i havent even finished everything:

0
0
48
Open comments for this post

6h 2m 25s logged

well hello again. space birb presents you the next devlog. I cleaned up the forms a bit (they are a still bit TOO messy ugly but they do work), REDID the ugly flags class to be a more EEEASIER TO WROK WITH (i dont even know how it worked before lol) and FINALIZED the auth pages!

RIGHT right, first frontend. I finally finalized the most basic and empty and everything pages of the frontend! wahoo mee :). these pages practically include the otp one and the 2fa one (+ recovery).. and i just realized that i forgot about the passkey one, great so now it isnt finished (fried space bird thingy).

Redid the pin component so it works with my Input form component AND also fixed some weired quicks of the pin component in phones (for some reason, my phone, didnt respect the max lenght of the input. i just sliced the value of the input on my max length lol).

And finally, the frontend now has the most precious bit of any… i dont know. i just added the typical dropdown componetn for the avatars (yes, this was important for me).

while on the backend, because mr past moon made some weired decisions, the 2FA recovery code generator and giver of the code the state was a messy mess that I frankly dont know if I even tested it, because it accepted wrong codes? i dont even remember if it worked haha in the past BUT now it works as it should and its at least better readable with normal method names (not plainly “recovery” [… what does that mean anyway!?? you would need to look at the code to understand it! and that’s bad]).

ah, the typical moment has arrived, the one i always repeat. HERE’s your happily working auth pages for once, plus the “want to retry the email sending?”, the passkey one is still missing but that’s just slapping some paint (and painting my self) and boom (whhile this is practically the same as the past devlog, it just works better than the past devlog lol):

0
0
15
Open comments for this post

10h 19m 27s logged

would you look at that! Finnaly some functional pages with forms, ALmost finalized components… oh they are just the login pages….. and its not even all of the auth pages, just selected ones so the auth flow barely works.

BUT, THIS fLuffy (not fluffy) space bird has finalllizated converting (or thinks) the classes i had as global styles into beautiful svelte components with all those stars and happy things. happily, i am longer limited by having evertyhign in global space.. oh right, RIGHT. i wasnt even limited :).

AND the coolest compponent of all of them is the spinner one because it spins. The first pages have been plugged into an outlet called SuperForms (not really super, mostly helping to validate)! thanks to that, we now have working forms that post to the backend! with all those classic things, red colors and form validation. but, how I THE unfluffy space bird is pushing envelopes with the form inside of it?

by talking to my backend obviously! but not manually (doign every step each time manually), by using a library like the trusty openapi-fetch that eats the openapi schema of the server i used in the past iteration. BUT i trashed it into the.. trash because I was fed up by having to repeat a thousand times the same snippet of code in each form or even page (I could have used a service like class to make it easier tho!). it was swapped by Orval! Orval works with the same openapi schema BUT gives methods! No more repeating the same things, just use the method and boom. and also that openapi-fetch was mad that i used a more recent typescript version.

ANND, finally, the auth context was upgraded with a leg made of clay so it can now parse the BITENUM flags of, for example, the user (UserFlags) that tell what is enabled and what is not, if you didnt remember. Its practically a generic class with everything that i considered necessary that must be extended to be able to use it.

and that’s it. you may watch the shittiest video ever that just shows that it kinda works with the forms and logging in and that’s it with still mocked things:

0
0
12
Open comments for this post

6h 48m 47s logged

haha 10 days later. no progress just me rambling and going in circles. I am a bad space birb. RIGHT! I just were converting the css stuff into svelte components using the style tag (and the preprocessor duh).

That’s actually it, quite literally. No progress at all. Wasted time on, still, falling on the loop of trying to get something that “looks good”, but i dont reall know what i want in reality. ofc i try to get “inspiratainionion” from other websites and try to mix them together to then dislike the result, undo and rinse and repeat (at this point my fur and feather soaked hard on water). YOu may imagine it as thinking that you ahve a finish line when you done even know where it is.

i will just try to make the frontend work first without thinking about the design… AND i cant even promise THAT! because i will probbaly spiral into the same loop once again (saying oh this looks bad blah bleh bleh). god i am bad at making frontends or evne design or everything, but thats how people learn haha. it is a lesson that i should learn from now on.. i keep judging my work too harsly but i dont know. frontend is just harder for me.

here’s the useless non functional three pages that atleast have something layout:

0
0
14
Open comments for this post

1h 56m 8s logged

in the end i gave up in the design or well… can you even call it “design” when it was ugly even at teh start? yes, i tried my best at making it look “good” in my own eyes but i could not for the love of birds. it was bad anyways, like actually bad. I, to make it easy for my self and be able to copy how other people do it because i am a lazy bastard (stupid space birb that klanks its keyboard for nothing), will be using the typical two columns for each section. One for “what the heck is this section for” and the other for the actual content (wow).

man, i hate how the frontend is where i struggle the most when the backend should be where i should have struggled the most, not with this dude. agh. I also hate HOW i thought the layout i wanted initially was the best one and that i look great when in reality it was an aberration that didnt even look good and it really threw to the trash the unused space bruh. it just wasnt for this job, maybe for something else.. idk haha, what I know is that I think it already looks better with the simple sutff ive done lol [that’s sad btw :)].

as you may see int eh screen shooting, the audit log section instead of having a table it uses a… placeholder for a button with the same content it has currently because I frankly i am scared of making tables because of the probable difficulty i will have (because I am already struggling with teh simplest of things!).

ALSO, i need to stop making .scss files, compounded into a single css file using @layer and @use, to just use svelte components that use the style tag. it really doesnt change anything, but atleast i wont be doing “class=‘meow’” each time i want something, just using “” is half better lol (doesnt really fix anything, I just want to give use the svelte components).

finally, i am planning to use “services”.. they arent really services but more about wrappers around the openapi client. less manual labor for some shitty stuff that i wont need to do anymore. Still, its just a wrapper with nicer method names and namespaces.

(also, ill be adding profile pictures. didnt think i would be adding them tho)

here’s the typical dumb screenshot of what i think that looks “good” without doing that much work:

0
0
4
Open comments for this post

8h 59m 45s logged

i am ashamed. i am that bad or… well ive gotten to the point of real badness and what some call “skill issue” because I CANT make this hecking frontend.

its just too hard, i am just way more slower than before and what i though i was. i hate that i am not usign tailwindcss and isntead I am building my own scss styles IN @layer when i could have been using svelte components with the style tag but ugh bad decisions that can be still reverted i guess. For the layout of the settings, i even tried copying how I did it in the last iteration of this frontend (past server, not named meow auth).. i just did not like it because using a sidebar for this teeny tiny amount of information is wasteful (like this tiny [not really tiny] space birb).

Like the content is just the typical name, email, auditlog, 2fa, passkeys, sessions, oauth authorizations and user created oauth apps AND lets not forget about the admin panel. i am practically suffering with mundane crap that anyone can have done in probably 10 minutes by asking mr claude or even chatgpt OR even just copying an already made layout, but here i am suffering trying to make stuff my own way, telling my self that this was the worst decision i’ve made goddamit… at this point i will really become a hotpot space birb soup..

i just need one layout made and then it should be an easy job to then copy and paste to other tabs. then the enxt step is to wire it up the forms and have it communicate to the backend which should be an easy task (i think [… oh god please be easy])… i know this entries of the frontend will make my project go into deflation mode and stuff, and i even broken a promise that ive made my self to not make devlogs that are more than 5h long because of a review someone made of my project when i submitted it unfinished to flavourtown (yes, flavortown) which is sad but it is what is. you cant be perfect, that’s why i have a shit hecking design. i am just bad, a bad space bird i guess.

i already rambled too much in this suppossedly simple devlog. here’s your half crap “inspiration” that I used to (quite literally did a C&P of the page) of my past proyect using a sidebar (not what i want with this iteration) and the current state of art of my REALLY REALLY SHITTY curernt state page:

0
0
5
Open comments for this post

10h 54m 33s logged

hi hello. oh, ive been 10 hours doing the same thing!!1 god. So, I was doing the frontend design without using figma and uhh yes. And also removed the ability to use your login to.. login to the app. You just use your email (otp, and passkeys).

First, I forgot how to use figma, I only remember some shortcuts. I was going to use it (for frontend and logos) but seeing how struggled to make simple things, I only used it to swap the colors of the logo of MEOW AUTH, hmm yes, very meow. .

The frontend stuff… I frankly ALSO do not remember anything.. or well I do now remember some things thanks to me fighting to uncenter a div hah. The stack is practically svelte, as always, client rendered and scss (sassy :o) for the styling. In the start I was just going to use the same styling and structure of my first iteration of this project, beepauth (ew), and after doing all of that I thought “god, this looks pretty bad”, soo I then tried to make it look a bit better WITHOUT starting from zero again. And I did style it a bit better but I didn’t even like it. Like it felt like I hadnt even advanced at all, like if the same shitty fricking backend was the same from the past (probably noone would care because probably uhh noone cares.) [brains a weired and even more mine i guess, wawa].

So, naturally, i did the less sane thing, REDOING EVERYTHING again. Had to watch tutorials to relearn how use sass and picked up also some new css stuff that I wont even use (minus the layers! that pretty cool!!). And from that css stuff I discovered Oklch.. yes i swapped my whole color palette to that using their harmonizer that uses the equivalent of WCAG, APCA (contrast bg to text!).

At least the frontend now looks decent (or the first blocks fo the website). sadly the only frcking shitting heckign parts ive made are the login (and register BUT THATS THE SAME).

AWIT WAIT WAWA, I also swapped some gears in the BACKEND! I removed the login (username) entirely, now its just demoted to a non unique display name (for openid!). you must be asking why, because I changed it to use the login not long ago. Well, because I don’t have to force a user to give me a username AND their email on signup. Its easier to just give the email. And if you already have an account and hit, without knowing (our typical autopilot mode), the signup page, I can silently make a AuthChallenge for login instead of signup because both handlers return the same result. Then, after registering, I just force you to set a display name (by default its just the email, i could leave it like that but currently I want it to force you set a custom display name for OPENID).

By doing that, I practically removed the “vectors” (ooh hackiry stuffiry) for user enumeration [those vectors were the endpoints to see if a login (username) or email was already taken] (I also made so the login endpoint gives you a fake challenge id when the email doesnt exist {This works thanks to having the auth exchange handlers return “invalid code” even if the challenge doesnt even exist}).

here’s your screenshot of a login page that looks exactly like very other login page, maybe even shittier (sorry i am bad doing these kinds of things.) [also you have the logo colors, i went with purple because it looks cool and its a cool color] {the “Psst, over here” its just a random greeting, just like the ones i have in the emails} [[sorry for wasting 10 hours doing nothing]]:

0
0
4
Open comments for this post

18m 9s logged

a. hi there mr svelte! I was wondering if I should be drafting first a design in figma but meh. I like to suffer and make bad designs that progress very slowly to look mediocre at best! yay!1!!

anyways, ill be using scss as always (i frankly done even remember anything about it lol) and sveltekit. HERE’S YOUR stupid “hello world” from slevetkt (reaaly useful devlog):

0
0
2
Open comments for this post

18m 44s logged

oopsy. shoooort one, sorry. I added the forgotten oauth error StatusCodes and Descriptions.

there’s not much to it lol, I just forgot about it.
as always, here’s your even uselesser screenshot with code taht you can already see in the guthub:

0
0
1
Open comments for this post

1h 42m 47s logged

right, its a me! the teeny tiny waist sized space birb that is here to tell you that I added the ratelimiter!

It works just as i’ve explained in the last entry, it uses the IP of the user to limit the amount of requests via a ticket bucket. THe bucket is stored in memory, as again said before, so if the instance is restarted, goodbye ratelimits. EAch request eats 1 ticket AND the bucket tickets and refill rate can be set via the… middleware. who would have known wow. It always adds the typical “x-ratelimit-limit” bleh bleh bleh with all the info you can like that is useless BUT hey, its there for you.

I like making my own stuffies because its cool. THe root has a limit of 500 requests, refilling after 1 second. While the auth routes have a limit of 10 (sudo) and 20 (auth flows) requests, refilling after 1 minute. The other routes are just uhh protected under the umbrella of the root ratelimiter lol, no need for having to add a ratelimiter to every single route (god).

that’s it. there’s no more devlog. Now what i gotta start doing is the frontend. I will cry a bit because I am VERY very VEEERY rustified in the typescript department like I never touch it but meh I MUST do a frontend or else this is incomplete… and i will do be crying if i send it off in a incomplete state. THE frontend will be in svelte kit, because its cool and ive already used it in the last iteration and it left me with a good taste in my forked tongue (hahaha, i am space birb) AND thanks that Ive been using from the start utoipa to add an openapi schema, I can use it easily to make requests from the frontend! and i didnt need to suffer adding them after everything was done just like in the past iteration!

here’s your useless screenshot showing teh ratelimiter working and the headers and stuffies… god i am a mediocre at best writting long hecking devlogs for nothing:

0
0
3
Open comments for this post

1h 26m 53s logged

wow. that’s a long time doing nothing. I just updated the deps, tera had a change on its templating because it was rewritten from the ground up. pretty cool, now it kinda looks like jsx and at the same time not.

I also tried or well… I am thinking about making my own ratelimiter but was like, ugh. I was practically mega blocked on the idea of wanting a ratelimiter that used the IP + UserId. Both are easy but for some goddamn reason I kept going circles and circles and honestly I dont even remember why anymore, like huh!? In the end I will only be doing ratelimits via IP because they are the easiest AND THEY DO NOT NEED TO be stored in the database. yes database, you read it right. IN this version of my backend I wanted to use the least things AAANd the oNly thing required is just the database to make everything. Adding redis would be waste (and waste of ram) for just storing the ratelimiter.

Redis would be required if I wanted to run more than 1 instance of my application AND IF i wanted to distribute the info about “oh this guy is grounded, no entering the meow auth realm for 5 minutes” to all other running instances. BUTTT, as you might not see, I dont want to run more than instance nor want to distribute it to more instances if it were the case that I wnted to run more than 1 instance.

Soo, I went in circles in my crapppy bird brain because to add ratelimits via the user id I would have to store the info somewhere that wouldnt be erased (like in the in-memmory storing that i will be using) or else the ratelimits would be useless because… THEY WOULD BE ERASED from this whole realm when the instance is restarted (memory goes boom to the void, so does the ratelimiter).

That’s why I want to just implement the Ip based one, its the easiest one and the only one that I don’t care about loosing the information about the ratelimits when the instance is restarted. Also, i need to implement it yet lol i was just scrambling my head nuts and bolts hearing them clank while trying to ratchet them.

ALSO², i need to redo the email stuff because my brain has came up with a cool design lol but first gotta do the frontend to make it uhh look good before suffering making the email components.

I also started to hate the tera zed language extension. its crap. bad crap the worst one. ALSO, here’s your really useless screenshot this time showing code that you can already see on the github page (yay!1):

0
0
2
Open comments for this post

5h 9m 55s logged

hello again, its a me, a random space birb that is here to tell you that I completly forgot about the ratelimiting stuff. BUUT, I added the admin methods and UserFlags to be able to set… flags. not much rodeo this time.

had to think how i wanted the audit logs to work for the admin stuff. I first though about just having a bool saying “ah yeah admin” but meh, I think its better to have also an “actor_id”, the who did it user id, and boom. In the user side handlers for the audit log I just return the typical plain response of “yeah this was changed” (not sql joins, cheaper [?]) but in the admin side, I return the actor_id with some other things like the user login of the actor AND the user login of the user that was changed (cause why not!? its jsut another join statement in sql). Works wonderfully and even better now because before I had setup the user audit log to fetch AAAL the entries form the db and pee pee poo poo no, now that i have my paginated stuff, no way!

SOO, the admin methods are just the typical ones, see what the user has changed or an admin changed from an user via its audit logs, the oauth applications and authorizations management and that’s it. I will probably also add a way to know globally what the heck is being changed but idk about that, seems a big sql query (that is tiny but very costly in db terms) and I frankly want to avoid that… and even more avoid using redis because i hate it and that SOMEHOW i have better some beautiful organized code vs the first version of this backend where I used the typical DB+redis aaand it was ugly. i hate that.

I also added the UserFlags to be able to set flags like “is the user an admin?” or “is this user allowed to manage its oauth applications?” and so on. Pretty cool.

BUUT as always, I had to C&P some code (almost all of it) from past handlers to make the admin handlers work lol. I would really want to make a central place to put all the common handler code but meh. IT WORKS! and that’s what matters.

THe next things are just making the ratelimiting WHICCHC probably will be only inside the instance the user is reaching and that’s it. I would like to have global ratelimiting using the IP of the user or its account id but that would (i think) require redis… I really need to think about this because someone with a crappy toaster can make explode my poor baby vps.

ps. god do I really take that much time doing stuff? god i am slow at coding. i am bad goddamit.

that’s it. shallllll you see my shiitty api docs with the admin stuff and admin auditlogs becuase why not:

0
0
3
Open comments for this post

2h 13m 15s logged

hi and welcome to my unreadable journals. I added those oauth authorized applications management handlers that I forgot to add yesterday, like the typical “oh let me see what scopes does this thing use… OH GOD IT CAN SEE MY fur color I MUST revoke it NOW!11”.

Then I moved AAAL the handlers that touched ME user data to the.. obvious /me route so its prettier and doesnt pollute the air of the real auth related things. and did some cleanup in the http error department by merging some repeated errors.

god this is one of the shorter entries i’ve made i think. next up is doing ratelimting, probably roles or just an admin api and the “hey your account has been locked because of repeated tries to login”. i dont even know what will it take to make tests work god.

here’s your shitty screenshot showing my only progress, the oauth management bleh bleh bleh:

0
0
2
Open comments for this post

3h 25m 3s logged

hi, hello i am space birb in the sad corner and i am here to tell you that i added the the typical oauth management handlers that everything has. I also added a generic paginated database thingy to be able to make… pages when there’s more than 20 items (rows).

firstly, everything was easy. yes, no rocks not nothing that could set me on fire… minus that I HAD TO MAKE a paginated database thingy. WHY did i make it? idk man, i wanted because my bad coder brain thought that maybe someone could have more than 1 oauth application created (like a thousand) and that’s pretty bad for mr blue elephant database becuase that means eating 1000 rows in one go (and blue elephant doesnt like that, AND EVEN less if my vps has 1vcore and not really that much ram). SO, the best course of action was to make pagination to be able to cut in pieces the data and make it easier to load and handle.. even though the loaded rows are hardcoded (its 20 plus 1).

The pagination practically works by seeing if there’s more data after 20 items (that’s why it has a “plus 1”!), if so, we take the LAST item’s id (using a trait to access it, because you can’t really know in what form or what id will be used in any database model) in those same 20 items to set the ‘next’ param. That ‘next’ param is used to.. quite literally say “hi, uh could you give me the next rows after this id pretty please?” and boom works and i didnt set my self on fire but i did ruffle my feathers a bit because of.

Ill probably implement it to more places because the only places that use it are the oauth applications and user sessions because i am a bit lazy haha (i mean, its just C&P the current find_many* and use the pagination stuff and caboosh).

oh god, i forgot about the oauth consent management. great job me, NOW IT ISNT COMPLETE “everything” great coder i am great big bird brain.

My next plans are just to do some general cleanup with the openapi schema, add comments to the code and then start doing the frontend in mr sveltekit.. although i am too rusty in ts land and i will have to learn some stuff again and touch again scss and stuffies and god, i am going to get cooked in the sun and roasted like the space birb i am because of me no longer touching anything javascript.

here’s your really useless screenshots showing the INCOMPLETE oauth management handlers and the pagination thingy working:

0
0
3
Loading more…

Followers

Loading…