rescomputer / res-ios

Res is real computer speech, talk with an AI that listens and can hold a conversation with you.
https://res.computer
38 stars 1 forks source link

Fetch jwt instead of hardcoding vapi api key #39

Closed mikejonas closed 3 months ago

mikejonas commented 4 months ago

I set up an api route to issue a temporary jwt that's signed by the vapi api key, so we don't hardcode the keys into the app. In the App, Before starting a call, it fetches a new jwt and starts the call with that.

I used Supabase for the api, since it's easy, but open to moving to something else if we need, or if anyone wants to.

issue-vapi-token api route (We should Setup a github organization for her, so that way can have an ios repo and a backend repo.)


I'm not used to working in swift, so if anything doesn't look right in the code, let me know.


Follow up plans:

mikejonas commented 3 months ago

I'll redo this since it's dated and there's merge conflicts