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
He can also postman post but I can not
u got some code?
for authentication
the whole thing?
no the relevent section
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?
are you on the branch?
yea it's mine I made specifically to push up
check again
this stuff happens when u get careless with procedure
yea he just switched into the remote branch I'm on rn and it works still for him
hmm idk then sorry
bummer, thanks for trying though
np
If you have no further questions, please use /close to mark the forum thread as answered
How did you set up authentication?
Do you get a specific error?
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
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/Check browsercache if it's relevant to your usecase
$close
If you have no further questions, please use /close to mark the forum thread as answered