0

Simple question. I want to migrate away from Firebase to an ASP.NET app written in C#. I got the password hash config, and I exported all the firebase user data. The passwords are hashed, so I need to use the same hash algorithm in my ASP.NET app. The Firebase project uses the firebase custom implementation of SCRYPT (apparently). How do call the same hash algorithm in a .NET app?

From reading this: https://firebase.google.com/docs/cli/auth

I can understand that they use this: https://github.com/firebase/scrypt

But I am not sure how to use that in a .NET context.

Community
  • 1
  • 1
Arkuni
  • 154
  • 1
  • 10

1 Answers1

-1

You first asking about a "user", but then you go on to talking about a whole re-write of the application in a 100% different system with a different database?

Well, then you starting a new project. You have to pick/choose/think about what type of logon system you going to use.

Then you have to get that pot of coffee and now re-build and re-write the system in asp.net. I mean, if I write a project in FoxPro, then decide to use asp.net, then you have to re-build the system in a 100% different architecture. it is called writing software if you are wondering.

If you have some project written in c++, and now you want to run it on Android? Then you have to re-build the application from scratch, and re-write in a whole new system.

If you wrote a Android program, and now want it to run on a Apple mac computer, then you have to get apple development tools and re-write that application.

So, moving a user? Well, that would be a simple matter of getting their logon information and entering that into the new database system (depending on what kind of logons and authentication system you are using). What kind of security and logon system are you going to use for the new system? Maybe their Facebook logons? You have to decide this issue.

But, be it desktop, web or phone? You have to re-write and re-build the software.

If you write some Software in c++, and now want to re-write in vb.net, then again it is a re-write. This is how all software has worked for 50+ years, and what you are attempting is no different here. Writing software in a different platform is simply writing software in a different platform.

it is assumed you have great skill in doing this. I mean, for any project we have this defined skill set:

Hence the #1 consideration is at what level the developer is at. There are certainly more levels then just "trained" or "not trained". Generally there are a "lot" of skill levels, but the following breakdown is sufficient. **

Stage 1 Innocent (never heard of the product)

Stage 2 Aware (Has read an article about X)

Stage 3 Apprentice (has attended a three-day seminar)

Stage 4 Practitioner (ready to use X on a real project)

Stage 5 Journeyman (uses X naturally and automatically in his job) 

Stage 6 Master (has internalized X, knows when to break the rules) 

Stage 7 Expert (writes books, gives lectures, looks for ways to extend x)

(from: Page-Jones, Meilir. "The Seven Stages of Expertise in Software Engineering", American Programmer, July-Aug 1990)

One should NEVER attempt a project with a team consisting with Stage 3 or lower people. This is a sure fire formula for failure. The team can consist of stage 4's, but they should have at least access to Stage 5, or 6.

So assuming you have a good skill set in asp.net? (a good number of months, perhaps a good year of experience), then I don't see the problem here. However, as such, software built on a 100% different platform is called writing software, and you have to do that. There are no shortcuts, or automated tools here, but you have a GOOD grasp of the new system in which you going build that software for. In most cases, a good skill set in the other platform is also required, or at lest having someone with that skill set on your team.

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51
  • I think you missed the point. The question was: How do call the same firebase scrypt hash algorithm in a .NET app? – Arkuni Oct 06 '21 at 08:51
  • I am not sure you can. And if it was that easy to do so, then I suspect that such security would not be really much security at all, would it? It going to depend on what security provider you use. I mean, you might want to use facebook logons? So security providers is a big complex topic. And unless you can adopt the same security provider system in that new site, then trying to replicate someone's security system I don't think is practical at all. – Albert D. Kallal Oct 06 '21 at 14:44