ObinnaAka
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/28/2023 in #👟framework
Segfault error when building
4 months after, but thank you for this fix! I used overrides (i use pnpm) to solve this.
Here are the overrides I had to use
9 replies
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/28/2023 in #👟framework
Segfault error when building
For now, I'll keep developing with my local version of plasmo, but in the future is a fix possible, either through a downgrade of parcel or some other workaround?
9 replies
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/28/2023 in #👟framework
Segfault error when building
After a bit more finnagling with my repo, I was able to get it to build again.
9 replies
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/28/2023 in #👟framework
Segfault error when building
I was just able to fix this and as suspected, it's because of Parcel. I cloned the plasmo repo and built it locally. Then I downgraded all parcel versions to 2.8.3 (from 10 months ago).
9 replies
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/5/2023 in #🦉pallas
Hey Pallas 2819 and lab
Ah I see, thank you very much!. I did try out 0.82.5 yesterday but still couldn't get it to work. Luckily, I've been able to port over most of the code with a fresh start anyway, so it isn't too bad. If I run into the problem again though, I'll post my finding here
7 replies
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/5/2023 in #🦉pallas
Hey Pallas 2819 and lab
For anyone that comes looking, I couldn't pinpoint the exact issue. I am running a monorepo with pnpm and I am importing components and functions from a "common" folder between my website and extension. I fixed it by starting from scratch and moving over the components one by one,
Another thing that helped was building the "common" before importing it. So I import common from the dist/* folder instead, and update my tsconfig to match
7 replies
PD🧩 Plasmo Developers
•Created by ObinnaAka on 9/5/2023 in #🦉pallas
Hey Pallas 2819 and lab
It only seems to happen when I have either a "contents" folder or a "tabs" folder. I'm running in a pnpm typescript monorepo
7 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
Got it working! The key is to do it in a tab page (https://docs.plasmo.com/framework/tab-pages) and not in the popup. This simplifies this tremendously as you can just treat a tabpage as a normal webpage.
Some key things to note:
1. When adding your redirectLogin and redirectLogOut URLs in Amplify, use this URL scheme instead of the normal https://<something>.domain.com/*
chrome-extension://<your chrome extension id>/tabs/loginTabPage.html/
The "/" at the end is important.
2. Once you do it in a TabPage, the Amplify Auth React library works as expected and there should be no need to deal with user session or authorization codes. However, if you find yourself dealing with that mess, check out this resource https://medium.com/codex/how-to-process-an-aws-cognito-authorization-code-grant-using-aws-amplify-b49d9ee052ca
15 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
Let me try working through this to see if I can implement this now
15 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
You are actually amazing. Thank you!
15 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
And what exactly are sessions and how do I manage them?
15 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
Am I meant to:
1. Store that authorization code in local storage?
2. Use it to make requests to an AWS Cognito endpoint to get the user details?
15 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
From my understanding, it is different from an authorization token?
15 replies
PD🧩 Plasmo Developers
•Created by lab on 2/1/2023 in #👾extension
AWS Amplify Auth in Extension
Here's what I'm doing so far
1. Use chrome.identity.launchWebAuthFlow to launch an authorization flow with my AWS Amplify Cognito Auth URL https://<app id>.auth.us-west-1.amazoncognito.com/login? redirect_uri=<redirect uri of chrome extension>
2. I can successfully complete the flow and get redirected from Amplify Auth > Google > Amplify Auth > Chrome extension
3. In the chrome extension, I receive an authorization code in the redirect URL from launchWebAuthFlow. I was not sure what the purpose of that code was initially, but it seems to be an authorization code granted from AWS Cognito.
So now the question is... what do I do with the authorization code?
15 replies