I am using this instruction from AzureAD to authenticate the application, and this is working, but when I am trying to integrate it into the AWS SAM, then I get {"message": "Missing Authentication Token"} when the application try to redirect.
here is part of SAM template:
Resources:
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: hello_world/
Handler: app.app
Runtime: python3.9
Architectures:
- x86_64
Events:
HelloWorld:
Type: Api
Properties:
Path: /
Method: get
so the login page is fine, I can see that with the API Gateways URL + /Prod but when I am logged in then is throw me the message {"message": "Missing Authentication Token"} and the URL is https://asdverftgsd.execute-api.us-east-1.amazonaws.com/Prod/getAToken?code=xxxxx
and this is the URL that I've registered in AzureAD
https://asdverftgsd.execute-api.us-east-1.amazonaws.com/Prod/getAToken
any idea what could be missed? I've tried also to add the new path to SAM template but none of them worked:
Events:
HelloWorld:
...
getToken:
Type: Api
Properties:
Path: /getAToken
# Path: /Prod/getAToken
# Path: /Prod/getAToken{token} # this is not accepted by SAM
Method: get