Fix auth header
This commit is contained in:
1 parent
13edce3d7a
commit
908013faee
2 files changed
+7
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import "pkg:/source/roku_modules/rokurequests/Requests.brs"
|
||||
import "pkg:/source/models/SearchSuggestionResult.bs"
|
||||
import "pkg:/source/models/SearchFilter.bs"
|
||||
import "pkg:/source/utils/Registry.bs"
|
||||
|
||||
namespace RokuYoutube.Services.Invidious
|
||||
const API_URL = "https://vid.puffyan.us"
|
||||
@@ -111,6 +112,9 @@ namespace RokuYoutube.Services.Invidious
|
||||
if token = invalid
|
||||
return invalid
|
||||
end if
|
||||
return {
|
||||
"Authentication": `Bearer ${token}`
|
||||
}
|
||||
end function
|
||||
|
||||
function GetUserFeed()
|
||||
|
||||
@@ -65,7 +65,9 @@ namespace RokuYoutube.Http
|
||||
if uri.StartsWith("/token_callback")
|
||||
components = UrlQueryComponents(uri)
|
||||
if components["token"] <> invalid
|
||||
RokuYoutube.Utils.Registry.Write("token", components["token"] )
|
||||
token = components["token"].DecodeUriComponent()
|
||||
|
||||
RokuYoutube.Utils.Registry.Write("token", token)
|
||||
print("Got Token!")
|
||||
end if
|
||||
m.Default(200, "OK")
|
||||
|
||||
Reference in new issue
Block a user