Experimental port to Firebase hosting
This commit is contained in:
@ -1,13 +1,11 @@
|
||||
const withToken = require('./withToken');
|
||||
import withToken from './withToken';
|
||||
|
||||
function encodeBase64(token) {
|
||||
return Buffer.from(token).toString('base64');
|
||||
}
|
||||
|
||||
function withAuthHeader(scopes, done) {
|
||||
export default function withAuthHeader(scopes, done) {
|
||||
withToken(scopes, token => {
|
||||
done(encodeBase64(token));
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = withAuthHeader;
|
||||
|
Reference in New Issue
Block a user