Skip to content

Missing "Bearer" keyword in Authorization Header #3080

Open
@wolf-mptechnology

Description

@wolf-mptechnology

Before opening, please confirm:

Language and Async Model

Kotlin

Amplify Categories

Authentication

Gradle script dependencies

// Put output below this line

amplify = "2.27.1"
aws-amplify-core = { module = "com.amplifyframework:core", version.ref = "amplify" }
aws-amplify-auth = { module = "com.amplifyframework:aws-auth-cognito", version.ref = "amplify" }
aws-amplify-api = { module = "com.amplifyframework:aws-api", version.ref = "amplify" }

Environment information

# Put output below this line

------------------------------------------------------------
Gradle 8.11.1
------------------------------------------------------------

Build time:    2024-11-20 16:56:46 UTC
Revision:      481cb05a490e0ef9f8620f7873b83bd8a72e7c39

Kotlin:        2.0.20
Groovy:        3.0.22
Ant:           Apache Ant(TM) version 1.10.14 compiled on August 16 2023
Launcher JVM:  21.0.4 (Eclipse Adoptium 21.0.4+7-LTS)
Daemon JVM:    /Users/xxx/Library/Java/JavaVirtualMachines/temurin-21.0.4/Contents/Home (no JDK specified, using current Java home)
OS:            Mac OS X 15.5 aarch64

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

Amplify does not add the "Bearer" keyword to the Authorization Header with the accessToken which is the standard. Many other tools are expecting this keyword in order to use default security mechanisms without custom handling (e.g. SpringBoot). It is possible to add another custom Authorization Header including this but some WAFs will throw errors due to duplicate headers.

Image

Reproduction steps (if applicable)

No response

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


Configuration File

No response

GraphQL Schema

// Put your schema below this line

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions