Avi
Explore posts from serversPD🧩 Plasmo Developers
•Created by Avi on 9/21/2024 in #🔰newbie
Adding alias
To introduce a "types" library that is shared between the back end front (extension), I created
root/types-lib/
which contains
when I tried to configure it in the extension's tsconfig.json
, I ended up with
but I end up with
6 replies
KPCKevin Powell - Community
•Created by Avi on 7/5/2024 in #back-end
Multi-provider authentication on Firestore
I'm working on an MV3 Chrome extension on a feature that requires authentication with a third party provider
Considering that I'm not proficient in backend, I was wondering what's the right way to handle multi-provider authentication, i.e. letting the user to login with both Google and Facebook
FYI, I chose Firebase for several reasons:
1. It has a great integration with extensions such that when I put a listener for a collection on Firestore in the background script, it prevents it from getting terminated
2. Firebase is quite beginner friendly
3. I was recommended for this project to take the NoSQL route
Note that Firebase officially supports authenticating with both Google and Facebook as well as linking accounts (https://firebase.google.com/docs/auth/web/account-linking), however that one works
So far I've successfully managed to store user data with a Google provider, i.e. whenever user completes the Google auth flow, I store his data under the UID I received
I could technically create a lookup collection that maps between users Google UIDs/Facebook UIDs and auto-generated UIDs and then a user's Google/Facebook UID is used to retrieve his data from the users collection, but it would require two reads, and I feel like there is a better and more efficient approach
1 replies
KPCKevin Powell - Community
•Created by Avi on 7/1/2024 in #back-end
Allow logins from multiple providers
I'm working on an MV3 Chrome extension and in the past several months I've been working on addin a paid feature that requires logging in to the extension
Considering that I'm not proficient in backend, I chose Firebase and Firestore
My goal is to allow the user to authenticate with both Google and Facebook
So far I successfully managed to let the user login with Google and I save his UID in Firestore, but I realized that if his account gets deleted due to https://support.google.com/accounts/answer/12418290 , he should at least be able to authenticate with Facebook
After he logs in with Google, he has to start a monthly PayPal subscription to use the feature, and so I pass the UID to the webhook and I update that Firestore entry
How do I approach changing the data structure such that the authentication and the PayPal webhooks can correctly reach the user in the database?
1 replies
KPCKevin Powell - Community
•Created by Avi on 6/2/2024 in #back-end
Firebase staging help
I'm new to Firebase and to back-end stuff in general, and I'm trying to use Firebase as I consider it a friendly way to integrate a back end into my project, which is a Chrome extension
Recently I've been trying to tackle the issue of setting up a staging environment. However,
firebase hosting:channel:deploy staging
isn't a great solution because the generated URL is short-lived, yet I need to put the URL hardcoded in the extension and distribute it to test users
What would be a better way to tackle this? Thanks2 replies
PD🧩 Plasmo Developers
•Created by Avi on 5/11/2024 in #👟framework
Dynamically load script
Based on https://docs.plasmo.com/quickstarts/with-google-analytics , I should be able to load https://developers.google.com/maps/documentation/javascript/examples/place-search#maps_place_search-typescript as well
I tied to do it in a CSUI Svelte component:
32 replies
KPCKevin Powell - Community
•Created by Avi on 4/23/2024 in #back-end
How to model the data?
I'm working on a Chrome extension that lets users get deeper insights into their YouTube watch time habits
I'm looking to use Firestore with Google auth to store the user's data, though I'm not proficient with the back end nor with databases, I just think that NoSQL is convenient enough
The current data format that's stored locally:
I also need to somehow store data in a scalable and maintainable way regarding:
1. Basic Google account information
2. PayPal subscription payment details
3. I also plan to introduce a feature of matching users based on their mutual watch time habits, so I also need to model data after dating apps
1 replies
KPCKevin Powell - Community
•Created by Avi on 4/20/2024 in #front-end
Making an element take 100% height and scrollable
I have a setup similar to:
I need the list to take the remaining height of
.child-2
yet also be scrollable
Currently, the list takes as much height as it needs while being constrained to .parent
's height, making .parent
's "internal" height increase
According to my testing, the issue seems to lie in max-height: 100%
6 replies
PD🧩 Plasmo Developers
•Created by Avi on 4/15/2024 in #🔰newbie
plasmo build --zip vs web-ext build
What's the difference?
https://extensionworkshop.com/documentation/develop/web-ext-command-reference#web-ext-build
2 replies
PD🧩 Plasmo Developers
•Created by Avi on 3/28/2024 in #👟framework
Flutter support
It would be interesting to see Plasmo supporting Flutter natively
2 replies
TTCTheo's Typesafe Cult
•Created by Avi on 3/24/2024 in #questions
Tailwind CSS variables based on light/dark mode
I'm importing my Sass styling into Tailwind and the structure is roughly
I have another section in my Chrome extension that has a toggle, something like
How do I make the equivalent in Tailwind?
4 replies
PD🧩 Plasmo Developers
•Created by Avi on 3/8/2024 in #👟framework
Firefox dev server manifest warnings
2 replies
PD🧩 Plasmo Developers
•Created by Avi on 3/6/2024 in #👟framework
Parallel dev servers
I need to both run
plasmo dev --verbose
and plasmo dev --verbose --target=firefox-mv3
, but when I run the latter I get
13 replies
KPCKevin Powell - Community
•Created by Avi on 1/10/2024 in #front-end
Dynamic max-height
I wish to make the list height transition but only up to a certain height
Markup:
2 replies
PD🧩 Plasmo Developers
•Created by Avi on 1/6/2024 in #🔰newbie
Payments with Google Pay
How do I integrate it?
3 replies
PD🧩 Plasmo Developers
•Created by Avi on 12/20/2023 in #👟framework
Google Analytics 4
Update the https://docs.plasmo.com/quickstarts/with-google-analytics to be using https://developer.chrome.com/docs/extensions/how-to/integrate/google-analytics-4#toc-requirements
6 replies
PD🧩 Plasmo Developers
•Created by Avi on 12/18/2023 in #👟framework
Hot swap Svelte components
7 replies
PD🧩 Plasmo Developers
•Created by Avi on 12/7/2023 in #👟framework
Svelte CSUI behaving unexpectedly
The CSUI contains both
<script lang="ts">
and <script lang="ts" context="module">
Suppose I have
As far as I've tried, every time the state within the container where the injected CSUI gets updated, (in my case, pressing like/dislike), the CSUI script re-runs as if it's being remounted6 replies
PD🧩 Plasmo Developers
•Created by Avi on 10/24/2023 in #🔰newbie
How to load SVG in CSS
In the docs I found https://docs.plasmo.com/framework/import
So I did
but it resolves to
rather than
8 replies
PD🧩 Plasmo Developers
•Created by Avi on 10/23/2023 in #👟framework
Losing styles when injecting popup component in CSUI
15 replies
KPCKevin Powell - Community
•Created by Avi on 10/15/2023 in #front-end
Help with math in SCSS
15 replies