ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

[NODE.JS] Node Auth/API Backend [Source] | Very Simple


  • Please log in to reply
[NODE.JS] Node Auth/API Backend [Source] | Very Simple

#1

0xWarning
0xWarning
    Offline
    44
    Rep
    387
    Likes

    Veteran

Posts: 658
Threads: 111
Joined: Jan 18, 2019
Credits: 0

Five years registered
#1

:ph34r: Node-API-Backend

 

Using Express, Mongoose, Bcrypt, and Node.js,

I'm currently working on a backend for an authentication system that features hashed passwords, JWT and numerous checks.

 

This is still a project is not yet FULLY complete

 

Current JWT Protected Endpoints (requires a login to get a token)

 

ADMIN

FILES

SECRET

 

:monkaeyes: Configuration

PORT = 1337
VERSION = 1.3.3.7
TOKEN_SECRET = SALTYTOKENS
CUSTOM_HEADER = PURE_SALT
CUSTOM_HEADER_VALUE = SALTYVALUE
DB_CON_STRING = MONGO-DB-CON-LINK-HERE

 
 

:monkaeyes: Getting Started

 

Install Node.js

Follow these instructions in a terminal environment.

# Goto Dir
$ cd Node-API-Backend

# Install packages
$ npm i

# Boot it up (Will be changed to 'npm start')
$ node app.js

:monkaeyes: API End Points

 

Note: Simply create a json body request for posts using the same values as the GET requests.

Most endpoints may require the auth-token header to be set which you get after you login

 

API

 

  Register

http://SERVER:1337/api/user/register (POST)

http://SERVER:1337/a...edwip/:referral (GET)

 

  Login

http://SERVER:1337/api/user/login (POST)

http://SERVER:1337/a...email/:password (GET)

 

  Upload

http://SERVER:1337/api/files/upload (POST)

Note: Check the response

http://SERVER:1337/api/files/upload_db (POST) Uploads to mongo db

Note: Check the response

 

  Upload List

http://SERVER:1337/api/files/list (GET)

Note: Returns json array list

 

ADMIN API

 

  Remove User

http://SERVER:1337/a...min/remove_user (POST)

Note: Making a post request with the query {email: "[email protected]"} will delete the associated account.

Make sure to include your CUSTOM_HEADER and CUSTOM_HEADER_VALUE in the header of the request

 

 Remove File

http://SERVER:1337/a...min/remove_file (POST)

Note: Making a post request with the query {name: "test.txt"} will delete the associated file.

Make sure to include your CUSTOM_HEADER and CUSTOM_HEADER_VALUE in the header of the request

 

SECRET API

 

  Get Download

http://SERVER:1337/a...ret/getDownload (GET)

 

  Dev Notes

http://SERVER:1337/a...ecret/dev_notes (GET)

http://SERVER:1337/a...submit_dev_note (POST)

 

:pedobear: SOURCE DOWNLOAD

Hidden Content
You'll be able to see the hidden content once you reply to this topic or upgrade your account.


Edited by 0xWarning, 02 June 2023 - 02:28 AM.

  • 0

?url=https%3A%2F%2Fi.imgur.com%2FKjHxebD

 

?url=https%3A%2F%2Fi.giphy.com%2Fmedia%2


#2

alexvasquez7
alexvasquez7
    Offline
    2
    Rep
    1
    Likes

    Member

  • PipPipPip
Posts: 51
Threads: 1
Joined: Mar 28, 2023
Credits: 0
One year registered
#2

sir this is wendys


  • 0

#3

ralph567
ralph567
    Offline
    0
    Rep
    3
    Likes

    New Member

Posts: 15
Threads: 1
Joined: Jun 24, 2023
Credits: 0
Half year registered
#3
Wow helpful

  • 0

#4

ate1
ate1
    Offline
    0
    Rep
    0
    Likes

    Advanced Member

  • PipPipPipPip
Posts: 98
Threads: 0
Joined: Jun 06, 2023
Credits: 0
Half year registered
#4

thanks.. very helpfull


  • 0

#5

94maldini123
94maldini123
    Offline
    0
    Rep
    1
    Likes

    Advanced Member

  • PipPipPipPip
Posts: 105
Threads: 0
Joined: Dec 14, 2016
Credits: 0
Seven years registered
#5

mau coba


  • 0

#6

arafat0951
arafat0951
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 15
Threads: 2
Joined: Jun 18, 2020
Credits: 0
Three years registered
#6

Looks Great will Help Me Alot Thanks Man 


  • 0

#7

coolbrobikash
coolbrobikash
    Offline
    0
    Rep
    1
    Likes

    Member

  • PipPipPip
Posts: 41
Threads: 0
Joined: Oct 24, 2023
Credits: 0
Half year registered
#7

great material


  • 0

#8

womepor
womepor
    Offline
    0
    Rep
    0
    Likes

    Lurker

Posts: 7
Threads: 0
Joined: Oct 25, 2023
Credits: 0
Half year registered
#8

Nice


  • 0

#9

SKITZODUDE0
SKITZODUDE0
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 16
Threads: 0
Joined: Sep 17, 2023
Credits: 0
Half year registered
#9

I have a question: Can this be utilized for extracting data from APIs of platforms like Twitch or YouTube live streamers?


  • 0

#10

skipogo
skipogo
    Offline
    0
    Rep
    1
    Likes

    New Member

Posts: 13
Threads: 0
Joined: Sep 25, 2022
Credits: 0
One year registered
#10

thank you


  • 0


 Users browsing this thread: