Compare commits

...

2 Commits

Author SHA1 Message Date
479d2623e6 change auth token header!
Google api docs LIED!
2026-04-20 08:06:12 +02:00
a3caa0ebfa I may be stupid 2026-04-20 08:06:05 +02:00
5 changed files with 19 additions and 2 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use nix

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/target
/.direnv/

10
shell.nix Normal file
View File

@@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [
protobuf
rustup
];
}

View File

@@ -17,12 +17,13 @@ fn get_live_id(channel: String) -> String {
}
pub fn auth_header(mut req: Request<()>) -> Result<Request<()>, Status> {
let token: MetadataValue<_> = "Bearer my-secret-token"
let oauth_token = "Yeah!".to_string();
let token: MetadataValue<_> = format!("Bearer {}", oauth_token)
.parse()
.expect("failed to parse token");
req.metadata_mut()
.insert("x-goog-api-key", token)
.insert("authorization", token)
.expect("WHAT");
Ok(req)
}

4
todo.org Normal file
View File

@@ -0,0 +1,4 @@
* Inbox
** TODO use .env here LOL
[[file:~/Code/youtube-chat-rs/src/grpc.rs::let oauth_token = "Yeah!".to_string();]]