mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
Compare commits
3 Commits
3b2d6cf76f
...
eab546406e
Author | SHA1 | Date | |
---|---|---|---|
|
eab546406e | ||
|
5998a6c1b4 | ||
|
d08ed9b52b |
@ -366,18 +366,17 @@ ipcRenderer.on(MSFT_OPCODE.REPLY_LOGIN, (_, ...arguments_) => {
|
|||||||
// Error from request to Microsoft.
|
// Error from request to Microsoft.
|
||||||
if (Object.prototype.hasOwnProperty.call(queryMap, 'error')) {
|
if (Object.prototype.hasOwnProperty.call(queryMap, 'error')) {
|
||||||
switchView(getCurrentView(), viewOnClose, 500, 500, () => {
|
switchView(getCurrentView(), viewOnClose, 500, 500, () => {
|
||||||
let error = queryMap.error
|
// TODO Dont know what these errors are. Just show them I guess.
|
||||||
|
// This is probably if you messed up the app registration with Azure.
|
||||||
|
console.log('Error getting authCode, is Azure application registered correctly?')
|
||||||
|
console.log(error)
|
||||||
|
console.log(error_description)
|
||||||
|
console.log('Full query map', queryMap)
|
||||||
|
let error = queryMap.error // Error might be 'access_denied' ?
|
||||||
let errorDesc = queryMap.error_description
|
let errorDesc = queryMap.error_description
|
||||||
title = error
|
|
||||||
description = errorDesc
|
|
||||||
if (error === 'access_denied') {
|
|
||||||
// TODO Write custom error messages.
|
|
||||||
title = error
|
|
||||||
description = errorDesc
|
|
||||||
}
|
|
||||||
setOverlayContent(
|
setOverlayContent(
|
||||||
title,
|
error,
|
||||||
description,
|
errorDesc,
|
||||||
'OK'
|
'OK'
|
||||||
)
|
)
|
||||||
setOverlayHandler(() => {
|
setOverlayHandler(() => {
|
||||||
|
35
docs/MicrosoftAuth.md
Normal file
35
docs/MicrosoftAuth.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Microsoft Authentication
|
||||||
|
|
||||||
|
Authenticating with Microsoft is fully supported by Helios Launcher.
|
||||||
|
|
||||||
|
## Acquiring an Azure Client ID
|
||||||
|
|
||||||
|
1. Navigate to https://portal.azure.com
|
||||||
|
2. In the search bar, search for **Azure Active Directory**.
|
||||||
|
3. In Azure Active Directory, go to **App Registrations** on the left pane (Under *Manage*).
|
||||||
|
4. Click **New Registration**.
|
||||||
|
- Set **Name** to be your launcher's name.
|
||||||
|
- Set **Supported account types** to *Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)*
|
||||||
|
- Leave **Redirect URI** blank.
|
||||||
|
- Register the application.
|
||||||
|
5. You should be on the application's management page. If not, Navigate back to **App Registrations**. Select the application you just registered.
|
||||||
|
6. Click **Authentication** on the left pane (Under *Manage*).
|
||||||
|
7. Click **Add Platform**.
|
||||||
|
- Select **Mobile and desktop applications**.
|
||||||
|
- Choose `https://login.microsoftonline.com/common/oauth2/nativeclient` as the **Redirect URI**.
|
||||||
|
- Select **Configure** to finish adding the platform.
|
||||||
|
8. Navigate back to **Overview**.
|
||||||
|
9. Copy **Application (client) ID**.
|
||||||
|
|
||||||
|
|
||||||
|
Reference: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
|
||||||
|
|
||||||
|
## Adding the Azure Client ID to Helios Launcher.
|
||||||
|
|
||||||
|
In `app/assets/js/ipcconstants.js` you'll find **`AZURE_CLIENT_ID`**, replace `FILL-IN` with your application's id.
|
||||||
|
|
||||||
|
Note: Azure Client ID is NOT a secret value and **can** be stored in git. Reference: https://stackoverflow.com/questions/57306964/are-azure-active-directorys-tenantid-and-clientid-considered-secrets
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
You can now authenticate with Microsoft through the launcher.
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -19,7 +19,7 @@
|
|||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"github-syntax-dark": "^0.5.0",
|
"github-syntax-dark": "^0.5.0",
|
||||||
"got": "^11.8.3",
|
"got": "^11.8.3",
|
||||||
"helios-core": "^0.1.0-alpha.5",
|
"helios-core": "^0.1.0-alpha.6",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"node-stream-zip": "^1.15.0",
|
"node-stream-zip": "^1.15.0",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
@ -2308,9 +2308,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/helios-core": {
|
"node_modules/helios-core": {
|
||||||
"version": "0.1.0-alpha.5",
|
"version": "0.1.0-alpha.6",
|
||||||
"resolved": "https://registry.npmjs.org/helios-core/-/helios-core-0.1.0-alpha.5.tgz",
|
"resolved": "https://registry.npmjs.org/helios-core/-/helios-core-0.1.0-alpha.6.tgz",
|
||||||
"integrity": "sha512-Ml6XNOg3lVmGXpvi3N+my01JW1QkzeghT5oQ3yU0Cby7R1az6z1kuz5UN2VuQpzsFeQtgqeTmDPQDOlXdvw9Nw==",
|
"integrity": "sha512-LkFPMa0V4nt6WlE2bn5aZnAGzQXLf3SJlr5potEcYFtqDgfm6m/hEOAEPTOjDLR+u9R+U1cazEg2Fr4mnQYORw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"got": "^11.8.3",
|
"got": "^11.8.3",
|
||||||
@ -6376,9 +6376,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"helios-core": {
|
"helios-core": {
|
||||||
"version": "0.1.0-alpha.5",
|
"version": "0.1.0-alpha.6",
|
||||||
"resolved": "https://registry.npmjs.org/helios-core/-/helios-core-0.1.0-alpha.5.tgz",
|
"resolved": "https://registry.npmjs.org/helios-core/-/helios-core-0.1.0-alpha.6.tgz",
|
||||||
"integrity": "sha512-Ml6XNOg3lVmGXpvi3N+my01JW1QkzeghT5oQ3yU0Cby7R1az6z1kuz5UN2VuQpzsFeQtgqeTmDPQDOlXdvw9Nw==",
|
"integrity": "sha512-LkFPMa0V4nt6WlE2bn5aZnAGzQXLf3SJlr5potEcYFtqDgfm6m/hEOAEPTOjDLR+u9R+U1cazEg2Fr4mnQYORw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"got": "^11.8.3",
|
"got": "^11.8.3",
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"github-syntax-dark": "^0.5.0",
|
"github-syntax-dark": "^0.5.0",
|
||||||
"got": "^11.8.3",
|
"got": "^11.8.3",
|
||||||
"helios-core": "^0.1.0-alpha.5",
|
"helios-core": "^0.1.0-alpha.6",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"node-stream-zip": "^1.15.0",
|
"node-stream-zip": "^1.15.0",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user