Origin of Ray

Lift the fog of the Internet together

If you want to understand the difference between arrow function and ordinary function and anonymous function, you must first clarify three concepts, prototype chain, scope, and context. These three concepts are very important and easy to confuse.

In general, the scope describes the scope of the variable, the prototype chain describes what path we follow to find a variable, and the context mostly refers to who this is, and getting a variable through this does not look up like the prototype chain.

Read more »

This week, I used NodeJs to process pictures in the coding process. Because the interfaces for picture processing are all Promises, my program is full of nested returns of Promises. The result of then returns another Promise, and another Promise. Some of the then in the series will return a new Promise, which once confused me.

After sorting it out, I couldn’t help but be curious about why Promise could be so magical, so I read its source code and found that the design behind some accustomed functions was wonderful.

Read more »

Overview

After roughly understanding the basic concepts of Bitcoin, it is much easier to understand the concept of Ethereum. The most important thing is to figure out what a smart contract is.

It’s just that the contract is actually a piece of code stored on the blockchain and running on the miner machine. Due to the limitations of Ethereum, this piece of code cannot be too large or too complex.

Read more »

Azure Key Vault is a tool for securely storing and accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, or certificates. A vault is logical group of secrets.

Read more »

Problem description

Passport-azure-ad is a plug-in that we need to use when we use node express as the server, passport to verify login, and azure third-party authentication login.

But in the use of the process we may encounter such a situation, that is, clearly all our configuration has been configured, but will encounter unlimited, callback situation, the specific form is that we use the Microsoft account login success, the page will continue to refresh, and finally prompt us can not successfully log in.

This constantly refresh process is actually to send an authentication request in the OAuth login process first. After the authentication is successful, the redirectURL that you configured in advance will be called back. This url is generally a request that our own server needs to handle. In this request, you need to Use the authenticate of passport to authenticate whether the login is successful. If the id-token is empty in this authentication, the request will be initiated again. Once the authentication is successful, the redirectURL will be called.

During this process, if you do authenticate successfully with Microsoft, but do not get the id-token when calling back your server request, there will be an infinite callback situation.

Read more »

OAuth 2.0

OAuth is an open web standard for authorization that is widely used around the world and is currently available in version 2.0

Read more »

I recently used the infinite loading component in the latest version of elementUI, and in some cases the loading function may be called infinitely during use, so I went to study the source code.

Read more »

JSON Web Token (abbreviated JWT) is the most popular cross-domain authentication solution available today

Read more »
0%