Comments (11)
Have you tried the samples?
from openiddict-core.
I have not, i wanted to start with a clean project to start with, so i could follow everything. I can try a sample project, which one do i need, Server or Client?
from openiddict-core.
Right, i have narrowed the problem down, and found out what is causing the error. Not sure if this is my mistake, or whether the readme file needs to be updated. In a default webApplication, this appears in the startup.cs file.
if (env.IsDevelopment())
{
app.UseBrowserLink();
app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
// For more details on creating database during deployment see http://go.microsoft.com/fwlink/?LinkID=615859
try
{
using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>()
.CreateScope())
{
serviceScope.ServiceProvider.GetService<ApplicationDbContext>()
.Database.Migrate();
}
}
catch { }
}
I have not got my site in development mode, so it is calling the Database.Migrate() method. I am not sure why the Application table is not created, because this is being called, but this is the reason.
Can someone shed some light on this?? I havent used EF7 yet, so not sure what is right/wrong
from openiddict-core.
Make sure your application DataSet is inside your ApplicationDbContext and the OnModelCreating has code to create the application table. If database already exists, you need create the migration code as well.
from openiddict-core.
Dbset added as tried inheriting from openid context as well as using own
and it compiles successfully.
Database didnt exist so would expect Application table to be created like
all other tables are
On 9 Jan 2016 23:41, "Yue Zhou" [email protected] wrote:
Make sure your application DataSet is inside your ApplicationDbContext and
the OnModelCreating has code to create the application table. If database
already exists, you need create the migration code as well.—
Reply to this email directly or view it on GitHub
#44 (comment).
from openiddict-core.
This was an issue with the DI. All sorted now
from openiddict-core.
Can you explain how you sorted it out? Tried with new project and run the examples but still getting the same error. Invalid Applications object.
Thanks
from openiddict-core.
Might exists a better solution, but this fixed the issue:
public class ApplicationDbContext : IdentityDbContext
{
public ApplicationDbContext(DbContextOptions options)
: base(options)
{ }
public DbSet<Application> Applications { get; set; }
}
Hopefully this can help others.
from openiddict-core.
Might exists a better solution, but this fixed the issue:
Nope, it's the right approach if you don't want to inherit from OpenIddictContext
. It's clearly mentioned in the README:
from openiddict-core.
Thanks, I read the readme and it did help resolving the issue; however the readme does not mention if inheriting from OpenIddictContext the Applications table will not be created. Which is the issue reported.
If there is a reason why the table is not created when inheriting from OpenIddictContext I would be interested to know why. Thanks
from openiddict-core.
If there is a reason why the table is not created when inheriting from OpenIddictContext I would be interested to know why.
Hum weird. Are you sure you didn't have a pre-existing database before updating your context class to inherit from OpenIddictContext
?
from openiddict-core.
Related Issues (20)
- integration openiddict identityServer .net core 7 with client .net framework 4.8 HOT 1
- Oracle doesn't support `RepeatableRead` isolation level. HOT 3
- I'm unable to get the authorization code when trying to authenticate an application with OpenIdDict HOT 4
- How to make the BFF Proxy Sample Dantooine work? HOT 65
- SPA and BFF on different sub-domains, BFFs for mobile apps HOT 6
- Getting The security token is missing during login validation on postman client authorization or web client authorization HOT 2
- InvalidOperationException: Cannot redirect to the authorization endpoint, the configuration may be missing or invalid. HOT 7
- OpenIddict + SPA UI Question HOT 9
- Remove `Uri.IsWellFormedOriginalString()`/`Uri.IsWellFormedUriString()`
- The specified token is invalid since we renewed SSL certificate in Azure key vault HOT 14
- invalid_token returned by authorization callback HOT 13
- Claims not found in token of external provider (Microsoft) HOT 5
- Using KeyVaultSecurityKey as asymmetric signing key and/or symmetric encryption key HOT 6
- unauthorized_client when changing url HOT 6
- Using "role" claims from external providers in access tokens HOT 7
- Update the OpenIddict client ASP.NET Core/OWIN integrations to support overriding the requested scopes via `AuthenticationProperties`
- openiddict 5.0.1 => 5.1.0, breaking change when adding amr array claim to id_token HOT 5
- Sharing the same signing key in a multi tenant environment HOT 7
- Enable the use of Azure Workload Identities with `.AddClient(options => { options.UseWebProviders().AddMicrosoft...})` HOT 3
- Microsoft Entra: ResponseMode "query" is not working good HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openiddict-core.