Live data from Hacker News

Source code for Dutch DigiD app released under Dutch Open Government Act

github.com

31–40 of 161 posts

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#31

Earlier quoted context omitted.

How this is used in practice is when you log in to a government site, you provide your DigiD account name and password, and then (often but not always) verify that it's really you with either SMS or (apparently) by scanning a document with NFC. Since it's just a single-use authentication I don't see a particular problem with doing it on another device. The actual government interaction after you're logged in happens…

> btw I see that attaching an nfc reader to your computer is also supported. Theoretically supported, or actually possible? As it stands, DigiD must be used with either the Android or the IOS app in the 'Substantieel' mode of authenticity verification when accessing health care records. This is likely to be pushed to other uses of DigiD as well eventually.

The 'Hoog' level seems to allow computer-connected readers, though. This should theoretically be a superset of 'Substantieel'. Windows and Mac only, though.

https://www.logius.nl/domeinen/toegang/digid/hoe-werkt-het

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#32
post #5

Earlier quoted context omitted.

I like it. Easy to understand, fast, no allocations.

It has almost twice as many comparisons as necessary. The term to the left of each AND is redundant because it has already been checked by the preceding IF. It also does not guard against negative arguments. Perhaps the environment in which it is used guarantees that negative arguments cannot occur. If I were reviewing this code I would at least ask the developer to add an assertion or contract requiring that the arg…

You know it's only a matter of time before someone dissects each one of your objections. In fact you could do so yourself with a bit of a wider perspective.

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#33
post #5

Earlier quoted context omitted.

I like it. Easy to understand, fast, no allocations.

It has almost twice as many comparisons as necessary. The term to the left of each AND is redundant because it has already been checked by the preceding IF. It also does not guard against negative arguments. Perhaps the environment in which it is used guarantees that negative arguments cannot occur. If I were reviewing this code I would at least ask the developer to add an assertion or contract requiring that the arg…

If you have int(percent * 10) + 1 you can just generate that many blue circles (checking for the edge-case of zero, or even better using ceil instead of int), the rest white and return it - no need for manually crafting the array (since the performance is, I presume, not a critical thing here). If tomorrow you want stars instead of the circles you just edit 2 chars in one place, instead of typing manually all combinations.

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#34
post #17
post #2

Example: https://imgur.com/a/9cIDQtk

I'm triggered by the lack of brackets after every if-expression. Sure it looks nicer this way but the default Visual Studio code style settings will complain if you don't do it, hence I'm used to it.

I've started to remove them from my own code. It's widely mentioned as The Right Way, but I feel the reasons why are obsolete. The stated reason is always that you could forget to add braces when adding a second statement.

That was useful in a time where a text editor was "smart" when it copied your indentation to a new line. But nowadays any tooling will warn you when indentation doesn't match the bracing. The odds of people making that mistake has gone so far down, that the risk is no longer worth the reduced readability.

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#35
post #5

Earlier quoted context omitted.

I like it. Easy to understand, fast, no allocations.

It has almost twice as many comparisons as necessary. The term to the left of each AND is redundant because it has already been checked by the preceding IF. It also does not guard against negative arguments. Perhaps the environment in which it is used guarantees that negative arguments cannot occur. If I were reviewing this code I would at least ask the developer to add an assertion or contract requiring that the arg…

[deleted]

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#37
post #23

Earlier quoted context omitted.

Apple iOS supportss NFC. https://developer.apple.com/documentation/corenfc

That's nice, I was under the impression only ApplePay had access to read and write data via NFC. Still no ability to write arbitrary data via NFC, but for the purposes of this app that's good enough.

The limitation is in the other direction, the iphone can’t be read or written over nfc as if it were a tag by an nfc reader (feature is called host card emulation).

It is technically possible but apple makes it very difficult to get the entitlement. When a project I was working on tried to get it (to enable the use case of unmanned sports and library facilities unlocked by swiping the phone instead of a badge), they failed. Apple basically ghosted us. After a while they simply stopped responding to our questions. This is why we can’t have nice things on iphone.

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#38
post #22

In order to verify your ID with the app your phone must have NFC support to scan the passport/id, and on the screen where you do the verification it says: if your phone doesnt have support find a friend with a phone that supports it, I kid you not.. edit, found it in the code: https://github.com/MinBZK/woo-besluit-broncode-digid-app/blo...

I don't think I've ever used DigiD to verify my passport, I was vaguely aware it had the capability though. On the other hand I use DigiD all the time to login to websites. My health insurance, government websites, etc. Super efficient and simple. The passport feature is a new one to provide an alternative safer method of verifying ID for the times you need it. It isn't the default use of DigiD and is meant as an alt…

The passport NFC scan is only intended to authenticate with DigiD once. Basically to connect your DigiD account to "you". In the past this was done by them mailing you a letter with a password in it to your registered place of living.

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#39
I find the DigiD app to be one of the most annoying implementations of 2FA out there. You have to unlock the app with a pin code, then enter an app-generated code on the site, then scan a QR with the app, and then grant permission to login to that site.

If you compare that to 2FA for Office 365 for example, where you just have a push notification where you press a button to allow, then you can't help but think that some attention to UX would be helpful.

As it is, I usually pick SMS verification instead of using the app. Yes, less secure, but so much easier.

Re: Source code for Dutch DigiD app released under Dutch Open Government Act

#40

The Norwegian welfare agency publish most of their code on github: https://github.com/navikt/ It's the organization you use if you're sick, lost your job, where you get your social security etc. Basically a huge behemoth of all kinds of social or labor services. While most of the code probably has little value for others (2000 different repos), I think it's quite noble that it's public, given it's made with tax payer…

Quite similar to Estonia. Tho they run their own Gitlab instance https://koodivaramu.eesti.ee/explore

And not everything is there. ID Card software is hosted on Github https://github.com/open-eid

Post reply on HN