Skip to content

Commit

Permalink
Move authServer to fix relative paths issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Macfarlane committed Jul 20, 2020
1 parent e1dce24 commit 7725bf1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Expand Up @@ -22,6 +22,7 @@ module.exports = withBrowserDefaults({
resolve: {
alias: {
'./env/node': path.resolve(__dirname, 'src/env/browser'),
'./authServer': path.resolve(__dirname, 'src/env/browser/authServer'),
'buffer': path.resolve(__dirname, 'node_modules/buffer/index.js'),
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js'),
'randombytes': path.resolve(__dirname, 'node_modules/randombytes/browser.js'),
Expand Down
2 changes: 1 addition & 1 deletion extensions/microsoft-authentication/src/AADHelper.ts
Expand Up @@ -6,7 +6,7 @@
import * as randomBytes from 'randombytes';
import * as querystring from 'querystring';
import * as vscode from 'vscode';
import { createServer, startServer } from './env/node/authServer';
import { createServer, startServer } from './authServer';

import { v4 as uuid } from 'uuid';
import { keychain } from './keychain';
Expand Down
Expand Up @@ -130,10 +130,10 @@ export function createServer(nonce: string) {
}
break;
case '/':
sendFile(res, path.join(__dirname, '../../../media/auth.html'), 'text/html; charset=utf-8');
sendFile(res, path.join(__dirname, '../media/auth.html'), 'text/html; charset=utf-8');
break;
case '/auth.css':
sendFile(res, path.join(__dirname, '../../../media/auth.css'), 'text/css; charset=utf-8');
sendFile(res, path.join(__dirname, '../media/auth.css'), 'text/css; charset=utf-8');
break;
case '/callback':
deferredCode.resolve(callback(nonce, reqUrl)
Expand Down

0 comments on commit 7725bf1

Please sign in to comment.