Authentication #170
No reviewers
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
dependencies
Epic
good first issue
hacktoberfest
help wanted
icebox
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
Osprey
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
resilience
Tom's Wishlist
type: bug
type: discussion
type: error handling
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/spee.ch#170
Loading…
Reference in a new issue
No description provided.
Delete branch "authentication"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR in progress (almost done, currently testing).
Good progress.
Did not finish this review prior to standup, but likely plenty to work on just from this feedback.
Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
@ -9,3 +10,2 @@
"Database": "lbry",
"Username": "none",
"Password": "none"
"Username": null,
Is there a reason this file uses
"none"
as a string instead ofnull
or something falsier?"This name is already in use by spee.ch"
"Claim" is an unusual word that is very LBRY specific. Let's avoid using it until we have to.
Does the daemon support two publishes to the same name if made from different channels?
@ -36,14 +38,32 @@ module.exports = {
fileType,
nsfw : publishParams.metadata.nsfw,
[file, claim] = result
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
@ -0,0 +8,4 @@
return new Handlebars.SafeString(
`<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Why do these have to be in a helper instead of just in a normal template?
(I know nothing about Handlebars -- you can just say it has to be this way if that's the case :) )
@ -123,0 +118,4 @@
},
})
.then(response => {
handleResponse(response, resolve, reject);
Should be a const somewhere
Should also probably be a const, assuming this is the same value for channels and publishes.
@ -72,3 +70,3 @@
if (title === '' || title === null) {
if (title === null || title === '') {
title = name;
}
description.trim() === ''
@ -0,0 +1,29 @@
module.exports = (sequelize, { STRING }) => {
const User = sequelize.define(
'User',
Is this a "User" or a "Channel"? I understand these have a 1-1 correspondence right now, but these are likely not the same thing as spee.ch continues to grow/evolve.
I think it is likely that this should be two tables, a User table and a Channel table, with Channel having a foreign key to User.
In addition to being more semantic, this would facilitate growth into a design where one user can access multiple channels from a single session/login without a tricky later refactor.
What if I'm not on Chrome?
Is this the only place we're making XMLHttpRequests in the app? If so, I suppose this is okay, if not, we might want to standardize this a bit.
Updating HTML via JS can quickly become a maintainability nightmare.
IMO a better design is to render all the elements and use JS to toggle hiding/showing, either by acting directly on the elements or changing the class name of the parent and using CSS to dictate what is shown.
👍
@ -9,3 +10,2 @@
"Database": "lbry",
"Username": "none",
"Password": "none"
"Username": null,
I did it so that when I called the variable later, if l logged the variable and got 'none' I knew the variable had been created but wasn't updated with the proper value for the environment. Not very clean/efficient. I fixed this now. They are all set to
null
and a script runs through them when the server loads and prints their values so I can check them up front. (250ead165b
)no, it will overwrite the first claim with the second, and just update the channel
👍
@ -0,0 +1,29 @@
module.exports = (sequelize, { STRING }) => {
const User = sequelize.define(
'User',
per our conversation today, I am updating the db to include both User and Channel tables
@ -72,3 +70,3 @@
if (title === '' || title === null) {
if (title === null || title === '') {
title = name;
}
👍
@ -0,0 +8,4 @@
return new Handlebars.SafeString(
`<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
They have to be in a helper so that they can be generated based on the proper google analytics key from the environmental vars
I still have yet to abstract the lbryApi into a proxy design, but the rest of the issues have been address. I'd like to commit this so that I can start working on the CSS on a separate branch. Will clean up the lbryApi in a separate PR.