Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 16 01:59

    kevinchalet on dev

    Allow determining the token for… (compare)

  • May 16 01:59
    kevinchalet closed #1444
  • May 16 01:59
    kevinchalet closed #1402
  • May 16 00:36
    kevinchalet milestoned #1444
  • May 16 00:36
    kevinchalet labeled #1444
  • May 16 00:36
    kevinchalet assigned #1444
  • May 16 00:36
    kevinchalet opened #1444
  • May 15 19:38
    kevinchalet commented #1396
  • May 15 19:35
    kevinchalet synchronize #1396
  • May 15 18:35
    kevinchalet synchronize #1396
  • May 15 16:50

    kevinchalet on dev

    Revamp HTTP response extraction… (compare)

  • May 15 16:50
    kevinchalet closed #1443
  • May 15 16:50
    kevinchalet closed #1442
  • May 15 16:33
    kevinchalet milestoned #1443
  • May 15 16:33
    kevinchalet labeled #1443
  • May 15 16:33
    kevinchalet assigned #1443
  • May 15 16:33
    kevinchalet opened #1443
  • May 15 10:42
    chihabhajji commented #1276
  • May 14 17:48
    kevinchalet milestoned #1442
  • May 14 17:48
    kevinchalet labeled #1442
Alexander Sidorov
@siberianguy
Is there any sample of integrating Application Code flow to Web Api Core with Openiddict?
Alexander Sidorov
@siberianguy
Thanks, forgot about that project
Matthias
@mredl
hi @PinpointTownes ! short question: why does the openiddict tables does not get generated with migrations?
Kévin Chalet
@kevinchalet
@mredl no idea. Someone reported a similar oddity recently. I guess it's an EF bug.
Matthias
@mredl
@PinpointTownes is there any workaround? looks like it only creates tables which are declared as dataset in dB context
Jameson Strocsher
@jamesond
I just ran some updates in VS 2015 for project dependencies and now my tokens are not being inserted. It looks like a column name was changed on the OpenIddictTokens table?
INSERT INTO [OpenIddictTokens] ([ApplicationId], [AuthorizationId], [Subject], [Type])
My current columns are ID, ApplicationId, AuthorizationId,Type,UserId
Does anyone know what might have changed these? I must have screwed something up with EF
Jameson Strocsher
@jamesond
I am assuming I need to migrate. Is there a guide on how to do this without screwing stuff up? haha
Jameson Strocsher
@jamesond
@mredl You having the same type of issues?
Kévin Chalet
@kevinchalet
@jamesond the change is expected. The schema must be updated when adding or updating model properties.
Jameson Strocsher
@jamesond
@PinpointTownes Thank you. I will check this out.
Jameson Strocsher
@jamesond
@PinpointTownes The suggested solution of modelBuilder.UseOpenIddict<int>(); didn't seem to do anything for me. Should I manually recreate the table with the proper columns? Not sure what the best solution is here. Thank you for any info.
Kévin Chalet
@kevinchalet
You must use the EF tools to migrate your DB, as mentioned in the question.
Did you do that?
Jameson Strocsher
@jamesond
Agh, I thought that guy said he did that and nothing happened. I will do that now.
Matthias
@mredl
@jamesond no i dont think so thats the same. i have developed a new app and wanted to switch from ensuredeleted & ensurecreated to migrate, but if i use migrate all openiddict tables does not get created. when i create i migration, they dont get included
Jameson Strocsher
@jamesond
EF Migrations only seem to apply per dbcontext. So as long as I keep all of my openiddict tables and such together I shouldn't have a problem keeping the schema updated? Is that the idea to keep them separate from all the other db tables? I don't have an init migration due to changes with my db, is there a way to keep existing data in the tables while updating the schema? Just been doing a little googling around and haven't found a solution/answer.
Matthias
@mredl
yes you could do a hack. create an intial migration, create the table [__EFMigrationsHistory] manually, insert a row for your initial migration and it would work
the next time when you start your app, the migration doesnt get applied again
the bad thing is, you have to ensure manually that your db structure matches your actual model
Jameson Strocsher
@jamesond
@mredl yea that kinda sucks and thats what I am doing now. Since the db schema has changed ("column names have changed for openiddict tables") I need to get these tables updated so that EF and the tables actually match. It would be nice to get it setup so this isn't a pain for the future, but I don't know if I have to clear all the tables and manually dump back in my users.
Jameson Strocsher
@jamesond
I know I did my original setup ass backwards, but can someone lend some advice on my best approach to get the openiddict tables synced up? Originally I did my ef migration on a local db to create the tables needed. I imported these tables to another database and now have data in there for a few months now. Since the schema has changed recently with Openiddict my tokens are no longer working. I am missing the subject column in openiddicttokens for example. I would like to get it setup so the openiddictdbcontext is synced with the database so I don't run into this again in the future. I am not sure if I need to backup everything and wipe the tables to recreate them? Or if there is a better way to go about it. Thanks.
Kévin Chalet
@kevinchalet
Note that OpenIddictDbContext is no longer a thing in the recent bits.
Jameson Strocsher
@jamesond
Hi @PinpointTownes I just mean the dbcontext that has this code in it.
public class ApplicationDbContext : IdentityDbContext<ApplicationUser,IdentityRole<int>, int>
    {
        public ApplicationDbContext(DbContextOptions options)
            : base(options) { }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);

            builder.UseOpenIddict<int>();
Kévin Chalet
@kevinchalet
Ah yeah. Fine then.
Jameson Strocsher
@jamesond
Okay cool. Thank you.
Kévin Chalet
@kevinchalet
Do EF migrations work with that code?
Jameson Strocsher
@jamesond
So with this current code. I create a migration and try to update the db, but I get errors saying 'There is already an object named 'oneofthetables' in the database.
I did what @mredl suggested and created the migrations table with an init entry and manually updated my openiddicttokens table to have the correct columns names. My tokens are back working now, but I know this is a temp fix and I would like to make sure I have it setup properly for schema changes in the future.
Kévin Chalet
@kevinchalet
I'd tempted to say that migration should work next time, as you now have the property migration table.
But no guarantee. I'm not an EF expert :(
Jameson Strocsher
@jamesond
Makes two of us my friend.... I will have to give it a go and create another migration and see if it works.
Kévin Chalet
@kevinchalet
lol
Jameson Strocsher
@jamesond
Thanks @PinpointTownes
Kévin Chalet
@kevinchalet
I'm even a bit surprised the "recommended" syntax (i.e options.UseOpenIddict() in Startup) didn't work in the first place :|
Sounds like an EF bug to me.
Jameson Strocsher
@jamesond
Yea I thought with the new bits that it was supposed to update the schema automatically.
Or do I need to always create a migration when I update openiddict?
Kévin Chalet
@kevinchalet
Only when there's a schema change ;)
Jameson Strocsher
@jamesond
cool cool. Makes sense.
toddtsic
@toddtsic
anyone available for advise on Angular2 setup code, specifically, scheduleRefresh(), refreshTokens(), GetTokens() routines, having trouble understanding fully (almost there but I'm getting unexpected firings of refreshTokens()
Shaun Luttin
@shaunluttin
@PinpointTownes I'm reviewing @Toxicable's PR and am looking for the canonical spec for the password flow. Is this what I should be using as the spec? https://tools.ietf.org/html/rfc6749#section-4.3
Fabian Wiles
@Toxicable
@shaunluttin looks like it
Kévin Chalet
@kevinchalet
@shaunluttin yup.
geminiyellow
@geminiyellow
yoo
hello everybody
Ruben de la Torre
@rubit0
hi @geminiyellow
Kévin Chalet
@kevinchalet
:wave: