use enter api to get meetingId, authToken, etc
This commit is contained in:
parent
a50d3d7895
commit
367b905ec5
@ -13,10 +13,23 @@ export function joinRouteHandler(nextState, replace, callback) {
|
||||
callback();
|
||||
}
|
||||
|
||||
// Auth.set(meetingID, userID, authToken); // TODO
|
||||
// replace({ pathname: '/' });
|
||||
callback();
|
||||
};
|
||||
// use enter api to get params for the client
|
||||
const url = `/bigbluebutton/api/enter?sessionToken=${sessionToken}`;
|
||||
|
||||
let BBBParameters;
|
||||
fetch(url)
|
||||
.then(response => response.json())
|
||||
.then((data) => {
|
||||
BBBParameters = data.response;
|
||||
console.log(BBBParameters);
|
||||
|
||||
const { meetingID, internalUserID, authToken } = BBBParameters;
|
||||
|
||||
Auth.set(meetingID, internalUserID, authToken);
|
||||
replace({ pathname: '/' });
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
export function logoutRouteHandler(nextState, replace, callback) {
|
||||
const { meetingID, userID, authToken } = nextState.params;
|
||||
|
Loading…
Reference in New Issue
Block a user