MichalBryxi, to random
@MichalBryxi@veganism.social avatar

My latest pet : Replace the "free" sharing services with simple solution where one has full control of (a) data collection (b) data storage (c) data sharing/visualisation.

If you want to give this like alternative a go, I'd be happy for any and all comments:

https://github.com/vast-ch/the-mountains-are-calling

MichalBryxi,
@MichalBryxi@veganism.social avatar

For the out there:

  1. There is pre-built solution for locaiton sharing & collection using , but anything that can fire HTTP request would do
  2. There is prepared manual on how-to host your own data on
  3. Client is just a web app that can take the object and splash it on a map
beste, to php
@beste@phpc.social avatar

Twenty. Seven. Thousand. Daily. Downloads. 🤯 I don't know where this sudden jump comes from, but WHERE'S MY SPONSORSHIP MONEY! 💪🏻😡

https://packagist.org/packages/kreait/firebase-php/stats

(Just kidding, of course, I know where it is - Firebase is almost exclusively used by businesses/corps)

jay, to opensource
@jay@phpc.social avatar

I'm currently providing an library for for free. works as you might expect it: it doesn't. Firebase is a commercial service, so I'm thinking of migrating my library and its future development to a paid one. Does anyone have experience in doing so? I know I could distribute it with private packagist, but is there a an already existing system of processing licenses and payments?

joe, (edited ) to javascript
@joe@toot.works avatar

Over the past week, I've been working on a / / app that has been sitting in the back of my head for a decade. I'm using composables for every logical object. This would be sooooo much more code with the options API but I can't help but look at a 1000 line view and think that I could make things even better.

joe, to random
@joe@toot.works avatar

is working on populating a cloud firestore collection with every city in the world (from a 36.8 MB JSON file).

dethos, to security
@dethos@s.ovalerio.net avatar

"900 Sites, 125 million accounts, 1 vulnerability"

"""
TLDR:

  • Firebase allows for easy misconfiguration of security rules with zero warnings

  • This has resulted in hundreds of sites exposing a total of ~125 Million user records, including plaintext passwords & sensitive billing information
    """

https://env.fail/posts/firewreck-1/

joe, to vuejs

This past autumn, I started playing around with the Composition API, and at the October 2023 Hack and Tell, I put that knowledge into writing a “Job Tracker“. The job tracker used Vuex and Firebase Authentication to log a user in using their Google credentials. With const store = useStore() on your view, you can do something like Welcome, {{user.data.displayName}} but using this technique you can also use …

const LoginWithGoogle = async () => {<br></br>try {<br></br>await store.dispatch('loginWithGoogle')<br></br>router.push('/')<br></br>}<br></br>catch (err) {<br></br>error.value = err.message<br></br>}<br></br>}

… to kick off the authentication of the user. I want to use it to finally finish the State Parks app but I also want to use Pinia instead of Vuex, I wanted the resulting app to be a PWA, and I wanted to allow the user to log in with more than just Google credentials. So, this past week, I wrote my “Offline Vue Boilerplate“. It is meant to be a starting point for the State Parks app and a few other apps that I have kicking around in my head. I figured that this week, we should go over what I wrote.

Overview

The whole point of this “boilerplate” application was for it to be a common starting point for other applications that use Firebase for authentication and a NoSQL database. It uses:

I was using a lot of this stack for work projects, also. It is nice because Firebase is cheap and robust and you don’t need to write any server-side code. Hosting of the front-end code is “cheap-as-chips”, also. The Job Tracker is hosted using Firebase Hosting (which is free on the spark plan) and The Boilerplate App is hosted using Render, which is just as free.

Authentication

I am most proud of how I handled authentication with this app. Here is what the Pinia store looks like:

From your view, you can access {{ user }} to get to the values that came out of the single sign-on (SSO) provider (the user’s name, email address, picture, etc). For this app, I used Google and Microsoft but Firebase Authentication offers a lot of options beyond those two.

https://i0.wp.com/jws.news/wp-content/uploads/2024/03/Screenshot-2024-03-04-at-11.31.08%E2%80%AFAM.png?resize=1024%2C588&ssl=1

Adding Google is pretty easy (after all, Firebase is owned by Google) but adding Microsoft was more difficult. To get keys from Microsoft, you need to register your application with the Microsoft identity platform. Unfortunately, the account that you use for that must be an Azure account with at least a Cloud Application Administrator privileges and it can not be a personal account. The account must be associated with an Entra tenant. This means that you need to spin up an Entra tenant to register the application and get the keys.

The third SSO provider that I was tempted to add was Apple but to do that, you need to enroll in the Apple Developer program, which is not cheap.

Firebase Cloud Firestore

I have become a big fan of Firebase Cloud Firestore over the years (at least for situations where a NoSQL database makes sense). The paradigm that I started playing around with last year involved putting the Firebase CRUD functions in the composable.

Here is an example <script> block from the Job Tracker:

The author of the view doesn’t even need to know that Firebase Cloud Firestore is part of the stack. You might wonder how security is handled.

Here is what the security rule looks like behind the job tracker:

The rule is structured so that any authenticated user can create a new record but users can only read, delete, or update if they created the record.

How I made it into a Progressive Web App (PWA)

This is the easiest bit of the whole process. You just need to add vite-plugin-pwa to the dev dependencies and let it build your manifest. You do need to supply icons for it to use but that’s easy enough.

The Next Steps

I am going to be using this as a stepping-stone to build 2-3 apps but you can look forward to a few deep-dive posts on the stack, also.

Have any questions, comments, etc? Please feel free to drop a comment, below.

[ Cover photo by Barn Images on Unsplash ]

https://jws.news/2024/wrote-a-thing-with-vue-and-firebase/

#CompositionAPI #Firebase #pinia #StateParksApp #VueJs #vuex

rzeszutek, (edited ) to webdev Polish
@rzeszutek@mastodon.social avatar

Od wielu lat używam ale nigdy niehostowałem tam żadnego produkcyjnego serwisu. Pierwszy postawiłem dopiero w tym roku. Przy śmiesznym wręcz ruchu w okolicach 6K użytkowników i o tego stronie statycznej miesięczny koszt to w przybliżeniu 30$.

Porównanie prędkości z najtańszym hostingiem współdzielonym wcale nie powala. Jedynie deploy jest przyjemniejszy

joe, to microsoft
@joe@toot.works avatar

“Starting November 9th, 2020 end users will no longer be able to grant consent to newly registered multitenant apps without verified publishers.“?!? What the hell?

https://learn.microsoft.com/en-us/entra/identity-platform/publisher-verification-overview

joe,
@joe@toot.works avatar

Ok, I stood up my own Microsoft Entra tenant to get "Login with Microsoft" working but now I need to figure out the error "auth/account-exists-with-different-credential". I think that linkWithPopup (https://firebase.google.com/docs/auth/web/account-linking) might be the key, here. :blobcatthink:

joe,
@joe@toot.works avatar

If you go to https://boilerplate.jws.app/login, you can use "Login with Google" and then "Link with Microsoft Account" so that you can log in using either. If you click "Login with Microsoft" and then click on "Link with Google Account" it seemingly just converts it to a Google account instead, though and I'm not sure the reason why. :blobcatthink:

Bristow_69, to android French
@Bristow_69@framapiaf.org avatar

Est-ce qu'un geek peut me confirmer que l'outil https://ntfy.sh/ peut permettre de se passer de pour les notifications sur téléphone ?

:boost_requested:

alexdeathway, to python
@alexdeathway@fosstodon.org avatar

Hey devs, I am working on a project that requires restricting a API from public access, but data generated from API needs to be made available to clients. So, came up with this workflow, what do you all suggest?

ramsey, to random
@ramsey@phpc.social avatar

I’ve been confusing Google’s with the open source database all this time and wondering why so many job descriptions were listing it. I was under the impression that Firebird must be experiencing some new wave of hip coolness among developer communities. 😂

beste, to php
@beste@phpc.social avatar

🚀 Release 5.0 of kreait/firebase-tokens, a library that enables you to verify ID Tokens and Session Cookies, as well as to create custom tokens, adds support for PHP 8.3 and drops support for PHP 8.1.

https://github.com/kreait/firebase-tokens-php/releases/tag/5.0.0

joe, to ChatGPT
@joe@toot.works avatar

I spent WAY TOO MUCH TIME building https://gist.github.com/steinbring/b5c0bce701569f576059eaeeb2eeb742 using . It is WAY MORE resource-limited than average folks think. I then used https://gist.github.com/steinbring/38e35d7dbb516464d8488d4fbf17a015 in to copy the data to Cloud Firestore.

I need to find a way of adding GeoJSON to define the borders of each park and a GeoHash value for each park, now. 🤔

telemetrydeck, to random
@telemetrydeck@social.telemetrydeck.com avatar

In our latest case study, indie app developer @chrisvasselli talks about his app @nihongo and shares his experience of switching from analytics to TelemetryDeck. Thanks for the great review!
https://telemetrydeck.com/casestudies/nihongo?source=fediverse

joe, to random
@joe@toot.works avatar

I spent an hour and a half today in a room with the boss, defending NoSQL as a concept.

joe, to javascript
@joe@toot.works avatar

I created https://joes-job-tracker.web.app this weekend at the Hack and Tell (https://hackandtell.rocks/events/2023-10/). It is mainly a proof or concept but it also replaced a spreadsheet that I have been using at work. I think that I need to build it more of a UI, though.

joe, to Milwaukee
@joe@toot.works avatar
joe,
@joe@toot.works avatar

Woot! There isn't exactly a UI there at the moment but the app is working.

https://joes-job-tracker.web.app/

You can sign in using Google's SSO, you should only be seeing your records, and you can create, read, update, and delete records.

If you are seeing, would you mind giving my job tracker a quick try? I want to see if it breaks.

rufposten, to random German
@rufposten@social.tchncs.de avatar

Lol, klappt 😁

(Habe die App mit apk.sh zerlegt, die URL umgeschrieben und wieder neu zusammengebaut).

@kuketzblog, meinst du das ist ne gute Lösung? Dann könnte man einen Endpunkt bauen, der leere Daten zurückgibt und so die Wiederholungen stoppt.

https://github.com/ax/apk.sh/

garrowbregenza, to androiddev
@garrowbregenza@mastodon.social avatar

What are privacy focused push notifications apis available apart from Google firebase?

beste, to php
@beste@phpc.social avatar

Unless funding is found to continue maintaining the Admin SDK for , maintenance will be halted. This includes the bundle and the package.

You can find more information in the SDK's readme: https://github.com/kreait/firebase-php

nosherwan, to security
@nosherwan@fosstodon.org avatar

🌩️
Cloud Authentication Services

There is a sea of Cloud Auth / Identity management providers.

There was a time I used to roll my own, but as security is getting complicated, it seems for startups & small to medium businesses it is better to use a cloud auth provider.

Please share your thoughts on your experience with this as I look into this area.

So far I have come across:


(by Okta)





beelzenef, to Flutter Spanish
@beelzenef@dotnet.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • kavyap
  • PowerRangers
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • ngwrru68w68
  • Youngstown
  • slotface
  • everett
  • hgfsjryuu7
  • tacticalgear
  • DreamBathrooms
  • Leos
  • Durango
  • khanakhh
  • osvaldo12
  • mdbf
  • vwfavf
  • ethstaker
  • modclub
  • tester
  • GTA5RPClips
  • cisconetworking
  • cubers
  • normalnudes
  • provamag3
  • All magazines