awslabs / aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
Apache License 2.0
932 stars 402 forks source link

/apis appears to return a 403 if not signed in on 3.0.6? #436

Open rayterrill opened 4 years ago

rayterrill commented 4 years ago

It looks like src/pages/Apis.jsx imports and calls getApi from services/api-catalog, which calls updateUsagePlansAndApisList, which appears to call apiGatewayClientWithCredentials from services/api, which appears to expect that cognito variables are set? Relative React n00b here.

/apis returns a 403 in DevTools, UI hangs with a spinning icon.

JohnG84 commented 4 years ago

I'm seeing the same issue with v4.0.3 - the Promise returned by apiGatewayClientWithCredentials never resolves if you navigate to the APIs tab when not signed in.

paosp77 commented 4 years ago

Hi, I have the same issue. For production usage it's kind of high priority. Any idea when it will be fixed?

leadiato commented 4 years ago

@paosp77 I'll be pushing a PR today

eulogio-gutierrez commented 3 years ago

Hi guys we are experiencing the same issue. Any idea when this will be sorted? Thanks a lot!

joserendal commented 3 years ago

Hello, Any updates on this issue? Still happening to me in the last version.

leadiato commented 3 years ago

@eulogio-gutierrez I implemented a quick workaround in dev-portal/src/pages/Apis.jsx where I am checking if there an apiKey available:

    if (!store.apiKey) {
      return (
        <Segment placeholder style={{ margin: '5em' }}>
          <Header icon>
            <Icon name='sign-in' />
            Please sign-in to access the available APIs
          </Header>
          <Button positive onClick={this.signIn}>Sign In</Button>
        </Segment>
      )
    }