You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/ExternalLogins.md
+46-12
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,11 @@
4
4
5
5
## Code Locations
6
6
7
-
Application entry point `src/client/index.html` in the `<head>` section:
7
+
Application entry point `src/client/index.html` in the `<head>` section ([COOP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy) header required to avoid errors during google auth popup):
- Add "Web" by selecting "add a platform" and selecting "Web". The initial UI only gives the option to enter one URL, so enter the first, save, then go back and edit/add the other.
80
+
- Example redirect for local: https://local.drs.mikeyt.net.com:3000/api/account/microsoft-login-redirect-web
81
+
- Example redirect for live: https://drs.mikeyt.net/api/account/microsoft-login-redirect-web
82
+
- Note that you can't add a "front-channel logout URL" that makes sense for multiple environments - you would need to setup separate accounts for each environment in this case
83
+
- Add "Single Page Application" (SPA) by selecting "add a platform" again and selecting "Single-page application" (might be called something slightly different)
84
+
- Example for local: https://local.drs.mikeyt.net:3000/api/account/microsoft-login-redirect
85
+
- Example for live: https://drs.mikeyt.net/api/account/microsoft-login-redirect
61
86
- Supported account types: "Accounts in any organizational directory"
62
87
- "Live SDK support": Yes
63
88
- "Allow public client flows": No
64
89
- API Permissions
65
-
- Microsoft Graph User.Read
90
+
- Microsoft Graph User.Read (might be setup by default)
91
+
92
+
The client_id you need to copy into your client code is also called the "application id" and can be found in the app "overview" section.
66
93
67
94
Other notes:
68
95
@@ -73,13 +100,20 @@ Other notes:
73
100
Google developer console
74
101
75
102
- Create a project
76
-
- Create an OAuth 2.0 credential
103
+
- Create an OAuth 2.0 credential (left nav, OAuth consent screen -> External user type)
77
104
- Add all appropriate javascript origins, including ports for local development. Examples:
78
105
-https://local.drs.mikeyt.net
79
106
-https://local.drs.mikeyt.net:3000
80
107
-https://drs.mikeyt.net
81
108
- In OAuth consent screen there is an "edit app" button, be sure to set "Your non-sensitive scopes" to have .../auth/userinfo.email, .../auth/userinfo.profile and openid
82
109
83
-
Code required:
110
+
Create API credential:
84
111
85
-
- Index.html (or other application entry point): <scriptsrc="https://accounts.google.com/gsi/client"asyncdefer></script>
112
+
- Left nav, Credentials -> top nav, create credential -> OAuth Client Id
113
+
- Application type: Web Application
114
+
- Name it something like "MyApp OAuth Credential"
115
+
- Add authorized javascript origins, example list:
116
+
-https://local.mydomain.com
117
+
-https://local.mydomain.com:3000
118
+
-https://mydomain.com
119
+
- Copy down client id and client secret to secure location
0 commit comments