Get the model ·
Github Source ·
Documentation
After I made this post a couple people wanted me to make it open source, so I present to you AuthAPI.
Its a simple way to use your favorite authentication app (Google Authenticator, Microsoft Authenticator, etc.) inside of Roblox.
Poll
How likely would you use this?
DISCLAIMER
Do NOT show the link for the QR code anywhere on the game. It could get your game banned.
20 Likes
Yoo, This is epic.
It could be used to Store Data, Like if your Account get’s Hacked (Like if someone stole ur “RoSecurity”), The Data can be Protected.
(Edited for better grammar)
1 Like
SpiralAPI
(arlo)
December 12, 2021, 2:07am
#3
This would be cool but I can’t really think of too many experiences that would require this.
Still a great concept though.
1 Like
zCrxtix
(zavier)
December 12, 2021, 2:20am
#4
This is a really nice idea. Very clean ui, and a better alternative to verification. You could use it for Discord verification, or to protect your game from bots. I would recommend to anyone.
1 Like
co_existance:
function authAPI.GetQRCode(secret, AppName, AppInfo)
local requesturl = "https://www.authenticatorapi.com/pair.aspx?AppName="..AppName.."&AppInfo="..AppInfo.."&SecretCode="..secret
return requesturl
end
Is this supposed to return an image? Because you are not able to actually get an third party image into Roblox like this.
It would be cool if you could get the binary data so you could construct a QRCode using UI elements That probably isn’t possible with this API though.
2 Likes
It returns a link that goes to a QR code.
SpiralAPI
(arlo)
December 12, 2021, 2:59am
#7
Directing users off-site is against tos and can get you banned.
4 Likes
I guess that make sense. I added a disclaimer to the post.
1 Like
Dr_Luxxe
(Luxxe)
December 12, 2021, 3:31am
#9
The disclaimer doesn’t fix the fact that your API is based upon directing users off-site to scan a QR code.
I made a pull request which attempts at improving your module, hope you find it useful, it introduces better error messages, changes some method naming, adds type annotation, adds proper errors in some edge cases, etc.
deprecatedbrain:main
← LucasMZReal:main
opened 03:33AM - 12 Dec 21 UTC
This pull request has these changes:
* `.CheckPin` is now called `.CheckPinAs… ync`!
* `.GetQRCode` is now `.GetQRCodeURL`!
* Methods will now error when wrong types are passed through them. (e.g. someone passes a non number value into `.CheckPinAsync`)
* Error messages are much better now.
* `.CheckPinAsync` now errors when the result returned doesn't make sense. (e.g. isn't "True" or "False")
* Methods now utilize type checking, so if you call a function with the wrong parameters, it will warn you about it before you even test the game.
Note: No testing was made, so check if both functions return what they should!
co_existance
(deprecatedbrain)
December 12, 2021, 3:47am
#11
I don’t mean for people to show the url in-game. When I was making this I was thinking of people using 2fa for things like admin consoles in cafe games or something. Not really usage for big games.
3 Likes
octav20071
(OctaViano)
December 12, 2021, 6:27am
#12
co_existance:
GetQRCodeURL
Only for this function, I would have your module in every of my games. I love QR codes.
1 Like
VortexColor
(VortexColor)
December 12, 2021, 8:52am
#13
You should use a QR code generator to show the QR codes in game.
See:
I’ve always wanted to make a barcode generator on Roblox, and now I have… at least a basic one.
It’s a Code 39 barcode generator (ModuleScript) which takes a string input and converts it into a barcode gui. It’s not the most incredibly useful thing, but I think it’s still pretty nifty.
Here’s the link if anybody is interested: http://www.roblox.com/Code-39-Barcode-Generator-item?id=167064974
A barcode in-game:
[image]
Scanning the same barcode with a barcode reader smartphone app:
[image…
and
I’m sure there are more libraries to generate QR codes in game but these are only a few ones you could use.
Would it perhaps be possible to display the QR code directly in -game to the player?
Edit: just saw the post above, that’s what I’m thinking of (generating the code to be shown in a GUI, with the raw data from the authentication service).
1 Like
eric12095
(eric12095)
December 12, 2021, 11:24pm
#15
make that would be idea to verification you should know discord verification or phone number can protect account so can be use authentication app i would this make great to be though can be protect
I’m not entirely sure but this appears to still return false even though the code is correct.
local authapi = require(game:GetService("ReplicatedStorage").AuthAPI)
print(authapi.GetQRCodeURL("RandommmTestApp", "Random application", "N/A"))
print(authapi.CheckPinAsync("199819", "RandommmTestApp"))
co_existance
(deprecatedbrain)
December 13, 2021, 8:49pm
#17
Does the GetQRCodeURL return false? Or just the CheckPinAsync?
Just checkpin, the QR code gets added successfully but the checkpin function always returns false.
co_existance
(deprecatedbrain)
December 13, 2021, 8:53pm
#19
Don’t send the pin as a string, send it as a number.
e.g
print(authapi.CheckPinAsync(123456, "RandommmTestApp"))
FutureCider:
local authapi = require(game:GetService("ReplicatedStorage").AuthAPI)
print(authapi.GetQRCodeURL("RandommmTestApp", "Random application", "N/A"))
print(authapi.CheckPinAsync("199819", "RandommmTestApp"))
Tried that already, tried it just now and still returns false.
1 Like