getpost
08/08/2022, 11:38 AMgetpost
08/08/2022, 11:38 AMsql
create policy "Allow users to read the groups they're in"
on public.note_group
for select
using (
(
auth.uid() in (
SELECT user_id
FROM note_group_membership
WHERE note_group_id = id
)
)
)
getpost
08/08/2022, 11:38 AMgetpost
08/08/2022, 11:40 AMsilentworks
08/08/2022, 11:48 AMgetpost
08/08/2022, 11:48 AMgetpost
08/08/2022, 11:48 AMgetpost
08/08/2022, 11:48 AMpincopallo
08/09/2022, 12:26 AMgaryaustin
08/09/2022, 12:57 AMTocas
08/09/2022, 12:58 AMTocas
08/09/2022, 12:59 AMgaryaustin
08/09/2022, 1:01 AMe0
08/10/2022, 5:28 PMDeepITM
08/10/2022, 5:50 PMfernandops26
08/10/2022, 6:47 PMapp.get(
"/auth/github/callback",
passport.authenticate("github", { session: false }),
(req: any, res) => {
res.redirect(`http://localhost:54321/auth/${req.user.accessToken}`);
}
);
Here, extension side, command to call to the main server and get access token, after that, they use it to access to every protected route
const app = polka();
app.get(`/auth/:token`, async (req, res) => {
const { token } = req.params;
if (!token) {
res.end(`<h1>something went wrong</h1>`);
return;
}
await TokenManager.setToken(token);
fn();
res.end(`<h1>auth was successful, you can close this now</h1>`);
(app as any).server.close();
});
app.listen(54321, (err: Error) => {
if (err) {
vscode.window.showErrorMessage(err.message);
} else {
vscode.commands.executeCommand(
"vscode.open",
vscode.Uri.parse(`${apiBaseUrl}/auth/github`)
);
}
});
But I am a little confused about how I should abort it using supabase. 😕fernandops26
08/10/2022, 7:05 PMAnt
08/11/2022, 12:13 AMgaryaustin
08/11/2022, 12:15 AMOlyno
08/11/2022, 12:22 AMswikarrr
08/11/2022, 7:27 AMmuji
08/11/2022, 10:53 AMmuji
08/11/2022, 10:53 AMmuji
08/11/2022, 10:54 AMmuji
08/11/2022, 10:55 AMpincopallo
08/11/2022, 12:07 PMOlyno
08/11/2022, 2:03 PMgaryaustin
08/11/2022, 2:05 PM