Skip to content

Identity 8 doesnt work on PostgresSQL #53433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Temoxa opened this issue Jan 17, 2024 · 5 comments
Closed
1 task done

Identity 8 doesnt work on PostgresSQL #53433

Temoxa opened this issue Jan 17, 2024 · 5 comments
Labels
area-identity Includes: Identity and providers ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. Status: Resolved

Comments

@Temoxa
Copy link

Temoxa commented Jan 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hello!

I make mini app where use AddIdentityApiEndpoints and AddEntityFrameworkStores in PostgresSql.

TestIndetity8.zip

  1. Empty AspNetUserTokens

When your loaded and extract arhive app then run docker compose up --build -d
and go to url http://localhost:8080/swagger/index.html
will be opened swagger as is image below
image

I call method /register then call /login its ok

BUT then connect to database and call query SELECT user_id, login_provider, "name", value FROM tst."AspNetUserTokens"; have empty result. Why? Where tokens after succesfull /login ?

  1. How extend methods Identity (/register, /login, /manage/info etc) ?

maybe I didn’t understand how to work, please help

Expected Behavior

1 - when call /login in table AspNetUserTokens insert record
2 - configurate Identity EndPoints

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

8.0.1

Anything else?

No response

@ghost ghost added the area-identity Includes: Identity and providers label Jan 17, 2024
@martincostello
Copy link
Member

Please provide the repro as a Github repository, not a ZIP file.

We ❤ code! Point us to a [minimalistic project which reproduces this issue (repro)](https://github.com/dotnet/aspnetcore/blob/main/docs/repro.md) hosted in a public GitHub repo.
We will close this issue if:
- The repro project you share with us is complex. We can't investigate custom projects, so don't point us to such, please.
- If we will not be able to repro the behavior you're reporting.
- If the repro project is attached as a `.zip` file.
- If the GitHub repro project is set to `Private`.

@martincostello martincostello added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Jan 17, 2024
@ghost
Copy link

ghost commented Jan 17, 2024

Hi @Temoxa. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@Temoxa
Copy link
Author

Temoxa commented Jan 17, 2024

Please provide the repro as a Github repository, not a ZIP file.

We ❤ code! Point us to a [minimalistic project which reproduces this issue (repro)](https://github.com/dotnet/aspnetcore/blob/main/docs/repro.md) hosted in a public GitHub repo.
We will close this issue if:
- The repro project you share with us is complex. We can't investigate custom projects, so don't point us to such, please.
- If we will not be able to repro the behavior you're reporting.
- If the repro project is attached as a `.zip` file.
- If the GitHub repro project is set to `Private`.

Ok, test project https://github.com/Temoxa/IdentityNet8

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Jan 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@mkArtakMSFT
Copy link
Contributor

Thanks for contacting us. The behavior you've observed here is by design. The generated accessToken and refreshToken aren't stored in the database. They're generated using DataProtection and are validated like cookies. That table that you've queries will be used to store email confirmation tokens for example.

@mkArtakMSFT mkArtakMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@mkArtakMSFT mkArtakMSFT added ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Feb 26, 2024
@Temoxa
Copy link
Author

Temoxa commented Feb 27, 2024

Thanks for contacting us. The behavior you've observed here is by design. The generated accessToken and refreshToken aren't stored in the database. They're generated using DataProtection and are validated like cookies. That table that you've queries will be used to store email confirmation tokens for example.

Thanks for answer!

What your think about point #2 ?

How extend methods Identity (/register, /login, /manage/info etc) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-identity Includes: Identity and providers ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. Status: Resolved
Projects
None yet
Development

No branches or pull requests

4 participants