0

I want to enable the login option for nuget feeding in visual studio.

My Requirement:

I want to feed nuget in visual studio. When user feed this, I want to enable login option.

The login popup contains email and password. After user login, the API returns to application. The API contains email and password. I want to validate the email and password in controller. If validate success means, we want to allow the user to use the package.

How to achieve this? Is there anyone have idea related to this?

URL Feed

Let me know if any concerns occurs.

2
  • Do you mean you want to add the Login authentication feature to your application? Commented May 8, 2018 at 10:51
  • I want to add login authentication when configuring nuget feed in visual studio. Commented May 9, 2018 at 4:21

1 Answer 1

2

How to enable login option while configuring NuGet feed in visual studio?

At this moment, There is no such login popup window to complete the login authentication. Visual Studio save the credentials in the nuget.config file.

If you head to the folder:

C:\Users\­<UserName>\­AppData\­Roaming\­NuGet

you can add the following to the NuGet.config file:

<packageSourceCredentials>
    <Contoso>
        <add key="Username" value="[email protected]" />
        <add key="ClearTextPassword" value="33f!!lloppa" />
    </Contoso>
    <Test_x0020_Source>
        <add key="Username" value="user" />
        <add key="ClearTextPassword" value="hal+9ooo_da!sY" />
    </Test_x0020_Source>
</packageSourceCredentials>

You can also secure this by adding the credentials via NuGet.exe:

Nuget.exe Sources Add -Name Contoso -UserName [email protected] -Password 33f!!lloppa

If you want have a login popup window to complete the login authentication, you can use a third party hosting service such as Rider 2018.1 EAP.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.