Code Monkey home page Code Monkey logo

Comments (9)

Doc415 avatar Doc415 commented on July 24, 2024 1

Please supply us with ready-to-run reproduction code in the form of something we can copy/paste, a (zipped) project structure or a GitHub repository.

We do not have capacity to craft or compose a reproduction for every issue that gets raised. In this case I would need to dive into the setup of the external providers first. As you have already done that, help us to help you by sharing what you have. Thanks.

I have Created a repository ready to run. Details are in README. I have added a short video to Issue.
https://github.com/Doc415/Fluent-Issue
Thanks.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on July 24, 2024

Please supply us with ready-to-run reproduction code in the form of something we can copy/paste, a (zipped) project structure or a GitHub repository.

We do not have capacity to craft or compose a reproduction for every issue that gets raised. In this case I would need to dive into the setup of the external providers first. As you have already done that, help us to help you by sharing what you have. Thanks.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on July 24, 2024

I've created the database locally and ran the migrations. Running the solution now gives:
image

Am I missing something in UserSecrets perhaps?

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on July 24, 2024

PS, I see in program.cs that you have builder.Services.AddQuickGridEntityFrameworkAdapter();

You should change that to use our own adapter which works together with the FluentDataGrid

from fluentui-blazor.

Doc415 avatar Doc415 commented on July 24, 2024

I've created the database locally and ran the migrations. Running the solution now gives: image

Am I missing something in UserSecrets perhaps?

I have filled dummy id and secret in appsetings.
I should mention it in the Readme
The application runs in my side, and i could not reproduce the error. I couldnt understand if this error appears when starting the application or using the solution for bug?
I am learning asp.net and not very experineced in github communications.
Anything i should do?

from fluentui-blazor.

Doc415 avatar Doc415 commented on July 24, 2024

PS, I see in program.cs that you have builder.Services.AddQuickGridEntityFrameworkAdapter();

You should change that to use our own adapter which works together with the FluentDataGrid

Thanks for the review. I ll fix it.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on July 24, 2024

I have filled dummy id and secret in appsetings. I should mention it in the Readme The application runs in my side, and i could not reproduce the error. I am learning asp.net and not very experineced in github communications. Anything i should do?

No worries. We all needed to learn it sometime 😀

I found the error for this. In code you had things like:

 googleOptions.ClientId = configuration["Authentication:Google:ClientId"];
 googleOptions.ClientSecret = configuration["Authentication:Google:ClientSecret"];

where that was specifiedappsettings as GoogleClientId (insteadof ClientId).

Can now debug...

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on July 24, 2024

Ok, found the issue. Will be changed in the next version of the templates.

For now, you do not need to change the /Account/Manage/ExternalLogins page (but you can if that works for you).

The fix will be made where the form post is handled, which is IdentityComponentsEndpointRouteBuilderExtensions.cs. We already have code in there to fix the /PerformExternalLogin post action. We just need to use the same fix in the /LinkExternalLogin action

  1. Add the following at the end of that file:
private static string TemporaryFluentButtonFix(string provider)
{
    // Temporary workaround for FluentButton returning a provider value twice
    // Split the comma-separated list of strings
    var providers = provider.Split(',');

    // Find the value that appears twice in the list
    provider = providers.GroupBy(p => p)
                        .Where(g => g.Count() == 2)
                        .Select(g => g.Key)
                        .First();
    return provider;
}
  1. Remove line 39 and further up until the var properties = ... and replace with
 provider = TemporaryFluentButtonFix(provider);
  1. In /LinkExternalLogin inset
 provider = TemporaryFluentButtonFix(provider);

before the line var properties = ...

As said, this will be part of the new templates.

Closing this as a solution is provided an will be fixed in next release

from fluentui-blazor.

Doc415 avatar Doc415 commented on July 24, 2024

Ok, found the issue. Will be changed in the next version of the templates.

For now, you do not need to change the /Account/Manage/ExternalLogins page (but you can if that works for you).

The fix will be made where the form post is handled, which is IdentityComponentsEndpointRouteBuilderExtensions.cs. We already have code in there to fix the /PerformExternalLogin post action. We just need to use the same fix in the /LinkExternalLogin action

  1. Add the following at the end of that file:
private static string TemporaryFluentButtonFix(string provider)
{
    // Temporary workaround for FluentButton returning a provider value twice
    // Split the comma-separated list of strings
    var providers = provider.Split(',');

    // Find the value that appears twice in the list
    provider = providers.GroupBy(p => p)
                        .Where(g => g.Count() == 2)
                        .Select(g => g.Key)
                        .First();
    return provider;
}
  1. Remove line 39 and further up until the var properties = ... and replace with
 provider = TemporaryFluentButtonFix(provider);
  1. In /LinkExternalLogin inset
 provider = TemporaryFluentButtonFix(provider);

before the line var properties = ...

As said, this will be part of the new templates.

Closing this as a solution is provided an will be fixed in next release

Thank you very much

from fluentui-blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.