Files
2026-07-13 13:34:48 +08:00

18 lines
674 B
Plaintext

webhookId = to_string!(.webhookId)
webhookUrl = to_string!(.webhookUrl)
env = to_string!(.env)
clientId = "126949014117-2gdb0rumoss7popm6j6io327qm2h5jdu.apps.googleusercontent.com"
if env == "production" {
clientId = "337740323093-ikgg567lpcao95abfis0ndo7mvdhebvp.apps.googleusercontent.com"
}
scopes = [
"https://www.googleapis.com/auth/calendar.events",
"https://www.googleapis.com/auth/calendar.readonly",
]
scopesStr = encode_percent(join!(scopes, " "))
"https://accounts.google.com/o/oauth2/v2/auth?scope={{ scopesStr }}&access_type=offline&response_type=code&prompt=consent&state={{ webhookId }}&redirect_uri={{ webhookUrl }}/oauth&client_id={{ clientId }}"