Commit aeb35c6
Implement proper ephemeral key generation for OpenAI Realtime API
- Replace direct API key exposure with secure ephemeral key generation
- Make server-side POST request to OpenAI /v1/realtime/sessions endpoint
- Return temporary ephemeral key that expires after 1-2 hours
- Keep API key secure on server, never expose to frontend
- Return session ID and expiration timestamp with ephemeral key
This follows OpenAI's security best practices for client-side applications
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 3793306 commit aeb35c6
1 file changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
35 | 51 | | |
36 | 52 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
40 | 57 | | |
41 | 58 | | |
42 | 59 | | |
| |||
0 commit comments