Google OAuth and scraping commits.
Read what I did in cw42. Creating a skeleton for loading & discarding it again while struggling with google OAuth.

It’s Wednesday and I have to think hard to know what I’ve done on Monday & Tuesday. Work was a lot until now and consumed a lot of brain power. I know what I’ve done this morning before work: I wanted to go to the gym, but urban sports was down so I got up early for nothing. Made the best out of it by reading with a croissant in a nearby bakery. Back to Monday. I researched more organisational stuff like if my legal protection insurance will also cover stuff for me as a “Kleinunternehmer”. On Tuesday, as far as I remember, I was hyped to code and work from home home. Which always means two hours of coding instead of one, since I safe the time of the commute. In those two hours I implemented a skeleton to show while the lambda function is scraping the web after a user clicked on add new product. I wanted to enable users to add a new product immediately and run the slower scraper asynchronously. Nice thought, and I managed to make it work, but my last action on this morning was to revert the entire commit. Because:
If the scraper fails, my current implementation does not even allow the user to save the url. But all the user does to create a new product is entering a new url. So will disconnect the scraper now from the product creation. My new flow will look like this:
- User adds product with url
- Product is created in database & page is refreshed
- Product is shown & url is saved
- Scraper runs asynchronously & on product card fields that would be filled by scraper show skeleton
- If scraper fails these fields will be empty, but editable by the user
- If scraper succeeds, these information will be added to the product and shown on the card
In retrospective
… I did not implement the flow above yet. I got stuck in a deep hole of enabling a google sign in. I want to replace my email/password login so I do not have to worry about user fraud, fake users, etc. since this then will be handled by google. If someone signs up with a google account I can be 99.99% sure it’s a real human. Therefore I followed these docs:
https://supabase.com/docs/guides/auth/social-login/auth-google#google-pre-built
And OMG! I got really stuck. Creating too many google accounts with my phone number so I had to use my girlfriends’, Shortly thinking I need to pay for google workspace now and not being able to add my Beri-media.de url to my account because it is already used in an account I lost. In the end I did it and that’s my advice:
Create a google workspace account and if you have to subscribe to a payed service do so. Then add Google identity to your workspace account which is free and cancel the payed workspace subscription. With your workspace admin email create a google cloud console account and link this account to your recently created workspace account. Done ☑️ I now have my client id and token to move forward in the code and implement the sign in.
See you next week! ✌🏽
Disclaimer: This blog is not AI polished. Not even corrected with ChatGPT. Raw from my techie brain trying to be artsy.