???????????????????????????????
misskeyのログイン実装作ってた
function Misskey_login(InstanceURI, R_data) {
if (parseFloat(R_data.version) <= 12.27) { // Misskey12.27以下の場合app/createを使ってそれ以上の場合はMiAuthを使う ちなみにこれは変なこだわり
//app/createを使ってアプリを作成
fetch(InstanceURI + "/api/app/create", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: {
"name": "Nowplaying For Activity Pub",
"description": "",
"permission": ["write:notes", "write:drive", "read:drive"],
"callbackUrl": CallbackBase + "misskey"
}
}) //app/createを使ってアプリを作成
.then(res => res.json())
.then(data => {
fetch(InstanceURI + "/api/auth/session/generate", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"appSecret": data.secret})
})// app/createで作ったアプリを使ってセッションを生成
.then(res => res.json())
.then(data => {
window.location = data.url; // 生成したセッションのURLに飛ばす
})
})
} else if (parseFloat(R_data.version) >= 12.28) { // 12.28以上
const uuid = crypto.randomUUID();//UUID作成
window.location.href = InstanceURI + "/miauth/" + uuid + "?name=Nowplaying For Activity Pub&callback=" + CallbackBase + "miauth&permission=write:notes,write:drive,read:drive";//飛ばす
}
}
最近の若い子って漫画すら読むのだるいって話見たけどホンマなん?
現役中学生教えて
スマホは連絡用なのでそれ以外をしたくない感じ
RE: https://calckey.aokaga.work/notes/9fw4eihoqv7s3g71
This account is not set to public on notestock.
教えてあげるから
RE: https://mattyaski.co/notes/9fw6o7wc2r
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.