Remove unused credential flows in e2e tests and examples#27508
Remove unused credential flows in e2e tests and examples#27508jzaffiro wants to merge 10 commits into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (712 lines, 14 files), I've queued these reviewers:
How this works
|
| username, | ||
| password, | ||
| }; | ||
| return fetchTokens(server, scope, clientConfig, credentials); |
There was a problem hiding this comment.
is fetchTokens used still? (fine if so, but check please :))
There was a problem hiding this comment.
No longer used - that and its caller (refreshTokens) have been removed.
alexvy86
left a comment
There was a problem hiding this comment.
The changes to examples/ concern me a bit... without understanding them 100%, it seems like things are changing such that only Microsoft devs would be able to run examples targeting odsp? (Because running tenant-setup requires interaction with internal Microsoft systems). cc @ChumpChief for thoughts on that part since he refactored things recently-ish in that space.
| _server: string, | ||
| _clientConfig: IPublicClientConfig, |
There was a problem hiding this comment.
These two aren't used at all anymore, right? Should they just be removed?
I don't think this is much different than requiring a script to get an old tenant to target ODSP, which was the case before. Please correct me if I'm wrong though. |
That side of things is probably fine, afaict this is mostly just trading one MSFT-only approach for another as you say. However please make sure the errors and documentation are sufficient for MSFT devs to figure this out - based on my read here, I don't know where the appropriate package is or how to set it up. |
| const packageImportLocation = process.env.token__package__import__location; | ||
| if (packageImportLocation === undefined) { | ||
| throw new Error( | ||
| 'The FIC credential flow relies on a test tenant checkout client, but no client was found. Ensure that the environment variable "token__package__import__location" is set to the location of a package that exports a compatible client.', |
There was a problem hiding this comment.
This error and the other errors below are hard to understand to the average user who is not immersed in FIC world :)
Recommend only giving directives that a customer who hits this will know how to do (e.g. "run this command" or "see this documentation page on what to do").
Also nit that we use double-quotes.
| 'The FIC credential flow relies on a test tenant checkout client, but no client was found. Ensure that the environment variable "token__package__import__location" is set to the location of a package that exports a compatible client.', | |
| "The FIC credential flow relies on a test tenant checkout client, but no client was found. Run my really cool command to provide it", |
| return usernames.map((username) => ficLoginCredentials(username, odspEndpointName)); | ||
| } | ||
|
|
||
| const ficLoginCredentials = ( |
There was a problem hiding this comment.
Nit, prefer a verb name
| const ficLoginCredentials = ( | |
| const getFicLoginCredentials = ( |
| The following environment variables must be set: | ||
| If you're a Microsoft developer, use the `@ff-internal/tenant-setup` package to populate this variable for `start:spo`: | ||
|
|
||
| - local\_\_testing\_\_clientId |
There was a problem hiding this comment.
@ChumpChief @alexvy86 is getkeys still in use? I'm pretty sure it's not and that the test tenant variables have been removed from the key vault but I'm not positive. If this is still a valid use case I'll revert this change.
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
Now that the new credential format has been implemented (#26714) and tested, remove the old formats from both the real service tests and the Fluid examples.
AB#74331