mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Make angular client load dynamically the generated client id/secret
This commit is contained in:
parent
2693922352
commit
23a5a916db
3 changed files with 46 additions and 0 deletions
|
@ -35,6 +35,7 @@ const Users = {
|
|||
getAccessToken: getAccessToken,
|
||||
getClient: getClient,
|
||||
getClients: getClients,
|
||||
getFirstClient: getFirstClient,
|
||||
getRefreshToken: getRefreshToken,
|
||||
getUser: getUser,
|
||||
getUsers: getUsers,
|
||||
|
@ -64,6 +65,10 @@ function getAccessToken (bearerToken, callback) {
|
|||
return OAuthTokensDB.findOne({ accessToken: bearerToken }).populate('user')
|
||||
}
|
||||
|
||||
function getFirstClient (callback) {
|
||||
return OAuthClientsDB.findOne({}, callback)
|
||||
}
|
||||
|
||||
function getClient (clientId, clientSecret) {
|
||||
logger.debug('Getting Client (clientId: ' + clientId + ', clientSecret: ' + clientSecret + ').')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue