Skip to content

Feature/14 error on missing api key#23

Merged
TimPurdum merged 4 commits into
developfrom
feature/14_error_on_missing_api_key
Sep 23, 2022
Merged

Feature/14 error on missing api key#23
TimPurdum merged 4 commits into
developfrom
feature/14_error_on_missing_api_key

Conversation

@TimPurdum
Copy link
Copy Markdown
Collaborator

Closes #14

  • Defaults to showing an Error message, which also points to the UsingTheAPI.md documentation file.
  • Added documentation on how to suppress the error and use the default login screen.
  • Added two ways of providing the flag to suppress the error.
  • In the documentation, pointed out that the login screen was not as secure as OAuth, and also pointed out the sample code in MainLayout.razor for implementing OAuth login.

We will create a separate gissue for a more thorough OAuth implementation.

@TimPurdum TimPurdum requested a review from morehavoc September 13, 2022 23:29
@TimPurdum TimPurdum self-assigned this Sep 13, 2022
if (string.IsNullOrWhiteSpace(ApiKey) && (AllowDefaultEsriLogin is null || !AllowDefaultEsriLogin.Value))
{
ErrorMessage = "No ArcGIS API Key Found. See UsingTheAPI.md for instructions on providing an API Key or suppressing this message.";
#if DEBUG
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really put the entire if block inside the #if DEBUG? Since all we are doing is the print, there's no point in even checking if we are not in DEBUG.

Copy link
Copy Markdown
Member

@morehavoc morehavoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See Comment about #IF DEBUG

@TimPurdum TimPurdum merged commit e771bf8 into develop Sep 23, 2022
@TimPurdum TimPurdum deleted the feature/14_error_on_missing_api_key branch September 23, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface an error or log message when the API key isn't found

2 participants