Questions tagged [auth-token]

132 questions
0
votes
0 answers

how to get auth token using playwright

Using the playwright I want to get the Auth Token using the, how can this be done? I've tried await request.post('https://foobar/auth', { data: { accept: applicationJson username: 'foo', password: 'bar', } }); Is there some…
Huckleberry Carignan
  • 2,002
  • 4
  • 17
  • 33
0
votes
0 answers

getting auth token with got

So I'm trying to get an auth token using got.js ("got": "^12.5.1"), but can't find much documentation. I'm sort of floundering here. Any examples out there? Here's what I have so far: 'use strict'; const applicationJson =…
Huckleberry Carignan
  • 2,002
  • 4
  • 17
  • 33
0
votes
1 answer

Should the AngularJS application send the AuthToken or IDToken? When do use ID token vs Auth Token?

I have the following configuration in my ASP.NET Core Web API: // Adds Microsoft Identity platform (AAD v2.0) support to protect this Api services.AddMicrosoftIdentityWebApiAuthentication(configuration); services.AddControllers(options => { var…
0
votes
1 answer

401 failed request when trying to exchange authorization code for tokens w/ google

I'm struggling with this specific step in the Google OAuth process: "Exchange authorization code for tokens" (As called in Google Developers' "OAuth 2.0 Playground", Step 2). function getGoogleAuthURL() { const rootUrl =…
HCKRMVT
  • 355
  • 3
  • 10
0
votes
2 answers

how to add more attributes to what an api returns

I am trying to write an API using django rest framework in which, you give a username and a password and in return you get an AuthToken or in other words you login. now I want this API to also return some fields like the email of the user along with…
0
votes
2 answers

Best way to store auth token in angular app

My angular app connects to an AdonisJS rest api thatrequires an auth token to work. This token is generated on succesful login however storing it for future requests is a problem. Ive tried to use window.sessionStorage but unfortunately this remains…
0
votes
1 answer

getting AttributeError: 'str' object has no attribute 'decode' in rest_framework_simplejwt.serializers.TokenObtainPairSerializer.get_token()

i am developing web app related to election and try to implement authorize token concept using rest_framework_simplejwt.serializers and while running this code i encounter error related to str class like this: AttributeError: 'str' object has no…
0
votes
2 answers

API - Your AccountSid or AuthToken was incorrect

I am trying to send an SMS message using Twilio API in Windows 10. I enter the following request in CMD: curl "https://api.twilio.com/2010-04-01/Accounts/ACAccount SID/Messages.json" -X POST \ --data-urlencode "To=+Phone number" \ --data-urlencode…
0
votes
1 answer

How to retry API call once JWT token is refreshed?

Hi I am new to the front end flow of JWT auth and was wondering how to resend a request when a new token is issued. From my understanding Auth tokens should be short-lived, while Refresh tokens have a longer life span. This causes an issue where…
Eric
  • 31
  • 5
0
votes
1 answer

Azure b2c .Net core backend is always giving a 401, front react access token front end

I have a react front-end that sits behind a login with azure b2c, it allows the user to log in if they are registered in my tenant. I then sent a access token to my backed which i receive using "react-aad-msal" : signInAuthProvider.getAccessToken({ …
0
votes
0 answers

What is the proper syntax for axios post call to django rest-auth token in React JS?

Currently, my code is communicating with my django-rest-auth api. It is getting the token, however, it is not authenicating the request. My backend shows 200 (username and password is correct). While my front end, reactjs is declaring wrong username…
0
votes
0 answers

What is the correct way of generating authorization token in django?

I'm trying to generate auth token in my django project.When i inspect source code of django-rest framework, they seem to generate auth_token using:- binascii.hexlify(os.urandom(20)).decode() but auth_token should be unique so that i can find…
Gagan Singh
  • 200
  • 1
  • 13
0
votes
1 answer

How to send oauthAccessToken for each conversation of Microsoft Azure chatbot in Botium-box using Directline3 connector?

I want to perform live chat to Microsfot Azure chatbot using Botium-Box. The connection to chatbot is made using Diectline3 connector successfully. But the chatbot needs oauthAccessToken for conversation. Even I am able to send the Directline…
0
votes
1 answer

how to store Authtoken in Shared preference and validate Auth token when call by remote server

I have an application which is connected to remote server, after registration from android side an Auth token is passed from remote server, where do I need to store that and validate in Android side.
user10943690
0
votes
0 answers

How to get the OAuth token to be assigned to my HttpClient using .Net Core 2.2 AddHttpClient?

I'm writing an Asp.Net Core 2.2 application in which I'm adding HttpClient. services.AddAuthentication(o => { o.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; o.DefaultAuthenticateScheme =…
1 2 3
8 9