This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quero fazer uma api para autenticacao utilizando jwt, mas não estou conseguindo acho que misturei coockie com jwt | |
Estou usando a versao 5 do ADONIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as functions from "firebase-functions"; | |
import * as admin from "firebase-admin"; | |
const db = admin.firestore(); | |
// Callable funciton to create a user | |
export const functionCreateUser = functions.https.onCall( | |
async (data, context) => { | |
var firebaseError = ""; | |
console.log( | |
"function was called by user with id : " + context.auth?.uid || null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create policy "Public notes are viewable by everyone." on users | |
for select using (true); | |
create policy "Users can insert their own notes." on users | |
for insert with check (auth.uid() = id); | |
create policy "Users can update their own notes." on users | |
for update using (auth.uid() = id); | |
-- Policy to allow users to delete their own notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function update_profile () returns trigger security definer language plpgsql as $$ | |
begin | |
update public.profiles | |
set email = new.email | |
where id = new.id; | |
return new; | |
end; | |
$$; | |
create trigger update_profile_trigger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#format = """ | |
#[┣─system─❯](bold white) $hostname | |
#[┣─project❯](bold #FF8080) $directory$rust$git_branch$git_status$package$golang$terraform$docker_context$python$docker_context$nodejs | |
#[╰─cmd────❯](bold green) | |
#""" | |
[hostname] | |
ssh_only = false | |
format = '[$hostname](bold #FFC799) ' | |
trim_at = "." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import { defineStepper } from "@stepperize/react"; | |
import { zodResolver } from "@hookform/resolvers/zod"; | |
import { useForm, FormProvider, useFormContext, SubmitHandler } from "react-hook-form"; | |
import * as z from "zod"; | |
import React, { createContext, useContext, useState, ReactNode } from "react"; | |
import { | |
Form, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jsx_tag_auto_close": { "enabled": true }, | |
"edit_predictions": { | |
"mode": "subtle", | |
"copilot": { | |
"proxy": null, | |
"proxy_no_verify": null | |
}, | |
"enabled_in_assistant": true, | |
"disabled_globs": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//login-form | |
"use client"; | |
import { useForm } from "react-hook-form"; | |
import { z } from "zod"; | |
import { zodResolver } from "@hookform/resolvers/zod"; | |
import { useState } from "react"; | |
import { EbdoLogo } from "@/components/icons"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// login-form.tsx | |
"use client"; | |
import { useState } from "react"; | |
import { useServerAction } from "zsa-react"; | |
import { EbdoLogo } from "@/components/icons"; | |
import { Spinner } from "@/components/ui/spinner"; | |
import { Button } from "@/components/ui/button"; |