C
C#2w ago
RdZoid

2 people same endpoint different result, same data, same code

Hello, I'm having issues on a school project where me and another working on the project are trying to fix an endpoint in swagger for authentication, it works for them but not for me. We both are using the same data, we've looked over most everything code wise/appsetting wise but for whatever reason my authentication fails for any user while his works. BUT all the other endpoints work for me too. Any suggestions of what to look for?
20 Replies
RdZoid
RdZoidOP2w ago
He can also postman post but I can not
Holly Evergreen
u got some code?
RdZoid
RdZoidOP2w ago
for authentication the whole thing?
Holly Evergreen
no the relevent section
RdZoid
RdZoidOP2w ago
that's the thing, he's working on a branch I pushed up earlier and it works for him shouldnt' that mean code is the same?
Holly Evergreen
are you on the branch?
RdZoid
RdZoidOP2w ago
yea it's mine I made specifically to push up
Holly Evergreen
check again this stuff happens when u get careless with procedure
RdZoid
RdZoidOP2w ago
yea he just switched into the remote branch I'm on rn and it works still for him
Holly Evergreen
hmm idk then sorry
RdZoid
RdZoidOP2w ago
bummer, thanks for trying though
Holly Evergreen
np
MODiX
MODiX2w ago
If you have no further questions, please use /close to mark the forum thread as answered
SleepWellPupper
How did you set up authentication?
Harbour
Harbour2w ago
Do you get a specific error?
OlujA
OlujA2w ago
1)Are you %100 sure you are in the same branch? git status to check it and hard reset it just in case 2)check appsettings.json vs other person, compare it line by line. also check user secrets via dotnet user-secrets list 3)Maybe timezone/clock settings are off, check it out 4)Check DevTools>Network>Header if swagger is nolt sending auth header 5)Clean local build dotnet clean dotnet build and deleting bin, obj, .vs files might help
MODiX
MODiX2w ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat For longer snippets, use: https://paste.mod.gg/
Cracker
Cracker6d ago
Check browsercache if it's relevant to your usecase
SleepWellPupper
$close
MODiX
MODiX6d ago
If you have no further questions, please use /close to mark the forum thread as answered

Did you find this page helpful?