Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite/api #64

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Rewrite/api #64

wants to merge 2 commits into from

Conversation

MartinSkatvedt
Copy link
Member

This PR changes the api calls so that it retrives a key from localstorage to make API-calls to azure functions. This will make it possible to host nibble4 in a secure manner.

The key need to be stored as AZURE_DEFAULT_KEY in the applications localstorage. The key can be found in the azure functions app.

@MartinSkatvedt MartinSkatvedt added the enhancement New feature or request label Mar 31, 2021
@MartinSkatvedt MartinSkatvedt requested a review from Paalar March 31, 2021 19:36
@Paalar
Copy link
Member

Paalar commented Apr 18, 2021

Looks good, but is it ready to be merged w.r.t the azure-nibble validator?

@MartinSkatvedt
Copy link
Member Author

Looks good, but is it ready to be merged w.r.t the azure-nibble validator?

Yes, the functions are all written, and it works. However it propapbly needs some more error handling!

Copy link
Member

@Paalar Paalar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small comment, else it looks good!

process.env.REACT_APP_CLIENT_SECRET || ""
);
export const LOGIN_URL = (code: string, rfid: string): string =>
`https://nibble4-validator.azurewebsites.net/api/login?code=${code}&&rfid=${rfid}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should make https://nibble4-validator.azurewebsites.net/api/ into a base variable.

@MartinSkatvedt MartinSkatvedt marked this pull request as draft May 21, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants