nasa / earthdata-search

Earthdata Search is a web application developed by NASA EOSDIS to enable data discovery, search, comparison, visualization, and access across EOSDIS' Earth Science data holdings.

Home Page:https://search.earthdata.nasa.gov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EDSC-2669: As a user, I would like to receive a confirmation that my preferences have been saved

mreese84 opened this issue · comments

Description

When updating preferences, surface a confirmation message to the user that their preferences have been saved or if a problem occurred.

Acceptance Criteria

  • Upon success, inform the user their preferences have been saved
  • If an error occurs saving the preferences, inform the user that an error has occurred
    • If there is something the user can do to rectify the error, inform them what they can do

Giving this a shot.

@mreese84 I have my environment up and running. What I can't seem to find is where the User Preferences are. Can you point me in the right, direction?

I see the preferences route. It looks like I need to create an account.

You will need an Earthdata Login account so that you can log in. Preferences are only available to logged in users. You may set one up here: https://urs.earthdata.nasa.gov/

From there, just ensure that your dev environment is using the "prod" environment specified in static.config.json and you should be good to go.

I should clarify... Earthdata Login was formerly referred to as URS (User Registration System). So that's why the domain is urs.earthdata. EDL, Earthdata Login, and URS can all be used interchangeably.

I should clarify... Earthdata Login was formerly referred to as URS (User Registration System). So that's why the domain is urs.earthdata. EDL, Earthdata Login, and URS can all be used interchangeably.

Thanks for the update, I'll try that out.

@aamay001, A few thoughts as you start digging into this one.

We have thrown around the idea of using a Toast component (example) in order to display this notification, and in the future, similar ones. We are not tied down to any specific library, but the previous example looks like a good possibility.

Because we have Redux implemented, it would be preferred if the notification was triggered by a Redux action, and was implemented in a generic enough way that could be it could be used for other notifications around the application.

@aamay001, A few thoughts as you start digging into this one.

We have thrown around the idea of using a Toast component (example) in order to display this, and in the future, similar notifications. We are not tied down to any specific library, but the previous example looks like a good possibility.

Because we have Redux implemented, it would be preferred if the notification was triggered by a Redux action, and was implemented in a generic enough way that could be it could be used for other notifications around the application.

@trevorlang I'm following where you're going with this. I've used toast before. I can create some actions to push some toast notifications.

@trevorlang @mreese84

When I navigate to http://localhost:8080/preferences, I see that the route is nested under the AuthRequiredContainer which navigates to the local API http://localhost:3001/lab/login.

The local API edlLogin then redirects me to

https://urs.earthdata.nasa.gov/oauth/authorize?response_type=code&client_id=URS_CLIENT_ID&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2Flab%2Furs_callback&state=http%3A%2F%2Flocalhost%3A8080%2Fpreferences

which looks like it supposed to redirect me back to the local API edlCallback http://localhost:3001/lab/urs_callback but I end up here

https://urs.earthdata.nasa.gov/profile

with the error message Invalid request, please verify the client status or redirect_uri before resubmitting.

I see in the authorize URL above that URS_CLIENT_ID is coming from secrets.config.js. Do I need to fill these in with something in particular?

Additionally, I also see that in edCallback, SQS is being used and based on the README.md, I may hit a wall there once I get passed authorizing the user.

@aamay001 you're coming across a stumbling block that we hadn't thought through. We obviously can't give you our production credentials, but you need them to log in. So, we are brainstorming some solutions to try to unblock you. Probably won't have anything ready this evening, but we are discussing and will reach back out tomorrow.

No worries. I realized this would require some intervention. I’ll keep an eye out for your response.

@aamay001 we've got a solution in place for you. I'm about to drop you an email to the email address on your Github profile (contact@andyamaya.com).

Awesome! Thanks, that works!

@mreese84 Just confirming that the provided solution is working. I am now able to access the preferences route.

Submitted #1245 for this issue.