Chat Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
April 14, 2026 - @889.58 (what is this?)
Activity rating: Four Stars Posts & Arts: 80/1k.beats Random | Recent Posts | Guild Recents
News: There's a great big indie web tomorrow! :smile: Guild Events: There are no events!

+  MelonLand Forum
|-+  Materials & Info
| |-+  ⛄︎ ∙ MelonLand Info & Questions
| | |-+  MelonLand Passports (API + Auth + Hyper Actions)


« previous next »
Pages: [1] Print
Author Topic: MelonLand Passports (API + Auth + Hyper Actions)  (Read 163 times)
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
old-timey tunes~♪Flinstone VitaminAlways working hard!PoochKnown Apple shillcoolest melon on the web!
« on: April 08, 2026 @178.77 »

:pc: MelonLand Passports :pc:

Aha  :ha: It's you again! You've found the info thread for the MelonLand Passport system, this is a collection of tools including the API, mAuth and Hyper Actions, that allows you to create your own web apps, sites, games and stufffff, using MelonLand accounts and open data.

The main goal of this project is to make it really easy for people to create their own web apps, without having to worry about making or managing user accounts. So, instead of making a lil community site and trying to convince a few people to sign up to it, you can make a site and instantly allow all 3000 moderated and vetted melonland members to access it with no extra accounts needed  :ozwomp:

I should also credit @dream for the initial idea, we've been discussing this project for over a year and its slowly been taking shape!

For members: When you visit a site offering passport support, it will offer you a link asking for your MelonLand passport, click it, and you'll be shown what data the site is requesting. You can agree or deny. If you agree, site will keep you logged in untill you log out of the forum (then you have to agree again)

You can try a live version of the demo hosted on my blog server: https://thoughts.melonking.net/melonland-api-demo.php

For developers: You just include the API helper file in your project, and from there your able to access MelonLand accounts with a few easy functions! You can also access the API, and create Hyper Actions!

A view of the passport request screen:



What is mAuth and is it like oAuth? - mAuth is an authentication system, but its not like oAuth. It lets external websites you approve, access your id & username, for as long as you are logged in. This essentially means an app can piggyback off melonland accounts and use them in place of its own accounts system. Sites that use mAuth are the Wiki, Letters and the Everyone Site (although you don't see the approve screen or them  :grin: )

What is the API? - The MelonLand API is a public interface that can be used for getting data about the forum. You've actualy used it before, its used by Art Hub gallery embeds and Artifact embeds.

What are Hyper Actions? - These are new, they let you perform actions on the forum. For example if you click here, you can enter a hyper action that sends me 1 of your swap credits  :evil: (this is the only hyper action I've made so far...)



How do I get started??

To make use of Passports right now you'll need a PHP server and some basic PHP experience. I have attached the main melonland-api.php file you'll need, plus a basic demo file you can play with!

In the future I hope to port these over to JavaScript too, but to start with here's what ya get!

Multiple parts of the forum already use this system (such as the Nav) to access data, so it does work well, but I expect it will still break horribly being public, so please report bugs and let me know how it does!  :wizard:

 :4u:  GOOD LUCK  :ha:


* melonland-api-demo.php (3.9 kB - downloaded 5 times.)
* melonland-api.php (11.66 kB - downloaded 4 times.)
« Last Edit: April 08, 2026 @894.57 by Melooon » Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Waxed Lightly Weathered Cut Copper StairsshoeMicrowaveAir MailCup o' JaneI met Dan Q on Melonland!poochLasagna
TheFrugalGamer
Hero Member ⚓︎
*****
View Profile WWWArt


⛺︎ My Room
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
See A Bug Summer 2025 ParticipantGreat Posts PacmanFirst 1000 Members!Pocket Icelogist!Joined 2022!
« Reply #1 on: April 08, 2026 @719.48 »

This is awesome!!! Thank you so much! I honestly don't have any ideas for this at the moment, but it opens doors, if you know what I mean. I will definitely be playing with it soon!
Logged


Artifact Swap: Aquamarine
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #2 on: April 08, 2026 @773.82 »

I'm super excited to play with this, as you might have expected. My life's gonna be super busy for the next week or so but maybe I'll get to try it out after that!

There's all manner of interesting ideas I've been thinking about playing with that would be improved by something mAuth-ey.
Logged


Artifact Swap: I met Dan Q on Melonland!PolyamorousBouncy Egg!Joined 2025!Lurby
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #3 on: April 08, 2026 @796.85 »

Not played with this properly yet, but (from a quick whitebox code review) I've a couple of thoughts (all really minor!):

Code
function downloadMemberData($clientKey, $appOrigin, $extraData = [], $returnPath)

This function defines a required parameter after an optional parameter, which has semi-undefined behaviour. Possibly you wanted to used named parameters (although that would lock the API to PHP 8+, which might not be what you want)? But given that the other parts of the API always pass a parameter here, perhaps the signature should be:

Code
function downloadMemberData($clientKey, $appOrigin, $extraData = [], $returnPath)

You're suggesting that this file is placed in the top of the application directory. In that case, you might like to add to the top of the file something like this:

Code
if (basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME']))
{
    header('HTTP/1.0 404 Not Found');
    exit;
}

That'll mean that if a user goes directly to the /melonland-api.php file (which doesn't do anything by itself), they get a 404, rather than a blank page.
Logged


Artifact Swap: I met Dan Q on Melonland!PolyamorousBouncy Egg!Joined 2025!Lurby
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
old-timey tunes~♪Flinstone VitaminAlways working hard!PoochKnown Apple shillcoolest melon on the web!
« Reply #4 on: April 08, 2026 @809.22 »

That'll mean that if a user goes directly to the
Great! That's a good suggestion, I also added a few extra comments explaining parameters better!
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Waxed Lightly Weathered Cut Copper StairsshoeMicrowaveAir MailCup o' JaneI met Dan Q on Melonland!poochLasagna
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #5 on: April 08, 2026 @837.56 »

It's probably harmless that there's no domain validation on action requests, right...?  :cheesy:

I only ask because if you click this link you'll probably be asked to give an unreasonably huge number of swap credits to me... so obviously you'll click "deny"... and then... :ozwomp:

(It's a silly joke. I can't help but poke at the edges of things.)
Logged


Artifact Swap: I met Dan Q on Melonland!PolyamorousBouncy Egg!Joined 2025!Lurby
pyrrhic7
Newbie
*
View Profile


it's a horse
⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #6 on: April 12, 2026 @672.96 »

This is so neat! I've long wanted to build an experimental, tiny exportable pet game (something I imagine MelonLanders would especially vibe with). This announcement is just the push I needed to make a humble start on it :dog: Thanks for setting this up!
Logged
Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi

MelonLand Nav

@000

Want to Login or Join ?

Minecraft: Online
Join: craft.melonking.net