- ABP Framework version: CLI 8.0.2
- Tiered (for MVC) or Auth Server Separated (for Angular): Separated Auth Server
- Exception message and full stack trace:
- Steps to reproduce the issue:
How do I setup postman to call the authentication flow to create a Bearer token that I can use as the auth header for other API calls? I need to:
- Login with credentials that are stored as environmental variables in Postman
{{loginUsername}}
and{{loginPassword}}
. - Process 2FA steps setup for that user (email, text message or authenticator) including prompting the Postman user for the validation code.
- Complete the authorization process and store the Bearer token value in variable for use in subsequent API calls.
- There should not be any redirect URL in any of these calls.
I am looking for the technique that would call the authorization for any pages in a collection, perhaps as a pre-request script? What are the endpoints? How do I process the options for 2FA flows? How do I generate and store the Bearer token?
These are the screenshots that might be relevant, but they are not screens I have used for configuration ... yet.
1 Answer(s)
-
0
hi
You can create an angular and enable the 2fa, then try to log in with the password flow. You will see the API requests in the browser console.
angular/src/environments/environment.ts
Change
responseType
topassword
.https://abp.io/docs/latest/framework/ui/angular/authorization?_redirected=B8ABF606AA1BDF5C629883DF1061649A#resource-owner-password-flow
const oAuthConfig = { issuer: 'https://localhost:44305/', redirectUri: baseUrl, clientId: 'MyProjectName_App', responseType: 'password'