Currently ReDoc shows the "Authentication" section by default. You can disable it by setting the no-auto-auth attribute:

    $build = [
      '#theme' => 'redoc',
      '#attributes' => [
        'no-auto-auth' => TRUE,
      ],
      '#openapi_url' => …,
    ];

… but that's just a work-around until we can surface the authentication information automatically.

See https://rebilly.github.io/ReDoc/#section/Authentication for an example.

The next phase of this depends on #2987434: Support config passing to allow injection of Authentication data..

CommentFileSizeAuthor
#3 2988275-3.patch447 bytesrichgerdes

Comments

richgerdes created an issue. See original summary.

richgerdes’s picture

Issue summary: View changes
richgerdes’s picture

StatusFileSize
new447 bytes

Attached patch adds the attribute to the element.

  • richgerdes authored 17f15b2 on 8.x-1.x
    Issue #2988275 by richgerdes: Hide authentication section until we...
richgerdes’s picture

Status: Active » Fixed

Committed and pushed

wim leers’s picture

Issue tags: +API-First Initiative

+1 for this because

… but that's just a work-around until we can surface the authentication information automatically.

Thanks, @richgerdes!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.